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
This commit is contained in:
parent
5a4a469bc2
commit
d5e4547ef9
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user