diff --git a/wp-includes/option.php b/wp-includes/option.php index 125f25d40d..537f7aafd0 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -2264,6 +2264,17 @@ function delete_network_option( $network_id, $option ) { 'site_id' => $network_id, ) ); + + if ( $result ) { + $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' ); + } } if ( $result ) { @@ -2293,15 +2304,6 @@ 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 0bb154cc04..c28e9d35db 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.7-alpha-58810'; +$wp_version = '6.7-alpha-58811'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.