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();