diff --git a/wp-includes/option.php b/wp-includes/option.php index 4dee6ce118..125f25d40d 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -1217,6 +1217,15 @@ function delete_option( $option ) { } else { wp_cache_delete( $option, 'options' ); } + + $notoptions = wp_cache_get( 'notoptions', 'options' ); + + if ( ! is_array( $notoptions ) ) { + $notoptions = array(); + } + $notoptions[ $option ] = true; + + wp_cache_set( 'notoptions', $notoptions, 'options' ); } if ( $result ) { @@ -2284,6 +2293,15 @@ function delete_network_option( $network_id, $option ) { */ do_action( 'delete_site_option', $option, $network_id ); + $notoptions_key = "$network_id:notoptions"; + $notoptions = wp_cache_get( $notoptions_key, 'site-options' ); + + if ( ! is_array( $notoptions ) ) { + $notoptions = array(); + } + $notoptions[ $option ] = true; + wp_cache_set( $notoptions_key, $notoptions, 'site-options' ); + return true; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 8fb2a9af2a..5d89d646c3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-58781'; +$wp_version = '6.7-alpha-58782'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.