diff --git a/wp-includes/class-wp-query.php b/wp-includes/class-wp-query.php index 7af38f135b..8525987454 100644 --- a/wp-includes/class-wp-query.php +++ b/wp-includes/class-wp-query.php @@ -3268,10 +3268,6 @@ class WP_Query { wp_cache_set( $cache_key, $cache_value, 'posts' ); } - if ( ! empty( $this->posts ) && $q['update_menu_item_cache'] ) { - update_menu_item_cache( $this->posts ); - } - if ( ! $q['suppress_filters'] ) { /** * Filters the raw post results array, prior to status checks. @@ -3466,6 +3462,10 @@ class WP_Query { $this->posts = array(); } + if ( ! empty( $this->posts ) && $q['update_menu_item_cache'] ) { + update_menu_item_cache( $this->posts ); + } + if ( $q['lazy_load_term_meta'] ) { wp_queue_posts_for_term_meta_lazyload( $this->posts ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 96cd3fc894..82e5bd0f37 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-beta3-54409'; +$wp_version = '6.1-beta3-54410'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.