Skip to content

Commit

Permalink
Set update_post_meta_cache and update_post_term_cache as false. (#47998)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Harris <jonny@jonathans-mbp.lan>
  • Loading branch information
2 people authored and ntsekouras committed Mar 7, 2023
1 parent 411a5c2 commit 0f5436c
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/block-library/src/navigation/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 0f5436c

Please sign in to comment.