From 53fd1436a00ec0e63105770935cb104cc9d658e2 Mon Sep 17 00:00:00 2001 From: Jonathan Harris Date: Mon, 13 Feb 2023 00:29:39 +0000 Subject: [PATCH] Set update_post_meta_cache and update_post_term_cache as false. --- packages/block-library/src/navigation/index.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/block-library/src/navigation/index.php b/packages/block-library/src/navigation/index.php index d29270a35109d..03aaae31c5bc9 100644 --- a/packages/block-library/src/navigation/index.php +++ b/packages/block-library/src/navigation/index.php @@ -373,12 +373,14 @@ function block_core_navigation_get_most_recently_published_navigation() { // Default to the most recently created menu. $parsed_args = array( - 'post_type' => 'wp_navigation', - 'no_found_rows' => true, - 'order' => 'DESC', - 'orderby' => 'date', - 'post_status' => 'publish', - 'posts_per_page' => 1, // get only the most recent. + 'post_type' => 'wp_navigation', + 'no_found_rows' => true, + 'update_post_meta_cache' => false, + 'update_post_term_cache' => false, + 'order' => 'DESC', + 'orderby' => 'date', + 'post_status' => 'publish', + 'posts_per_page' => 1, // get only the most recent. ); $navigation_post = new WP_Query( $parsed_args );