From d5e4547ef9b28182137ce1acd9c04c8d4617c156 Mon Sep 17 00:00:00 2001 From: westonruter Date: Mon, 23 Oct 2017 22:39:02 +0000 Subject: [PATCH] Menus: Don't prime nav menu items cache if a persistent cache is being used. Amends [14560]. Props david.binda. See #12734. Fixes #41662. git-svn-id: https://develop.svn.wordpress.org/trunk@41982 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/nav-menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/nav-menu.php b/src/wp-includes/nav-menu.php index a9c2bd35f3..503490b67a 100644 --- a/src/wp-includes/nav-menu.php +++ b/src/wp-includes/nav-menu.php @@ -663,7 +663,7 @@ function wp_get_nav_menu_items( $menu, $args = array() ) { } // Get all posts and terms at once to prime the caches - if ( empty( $fetched[$menu->term_id] ) || wp_using_ext_object_cache() ) { + if ( empty( $fetched[ $menu->term_id ] ) && ! wp_using_ext_object_cache() ) { $fetched[$menu->term_id] = true; $posts = array(); $terms = array();