Ticket #27120: 27120.patch
File 27120.patch, 1.0 KB (added by , 10 years ago) |
---|
-
nav-menu-template.php
250 250 } 251 251 252 252 // If the menu exists, get its items. 253 if ( $menu && ! is_wp_error($menu) && !isset($menu_items) ) 254 $menu_items = wp_get_nav_menu_items( $menu->term_id, array( 'update_post_term_cache' => false ) ); 253 if ( $menu && ! is_wp_error( $menu ) && ! isset( $menu_items ) ) { 254 // Check if we have a cache of this menus items first 255 $menu_items = wp_cache_get( 'wp_nav_menu_' . $args->theme_location ); 255 256 257 // If no cache exists for this menu, fetch it and set the cache in case of repeat use 258 if ( ! $menu_items ) { 259 $menu_items = wp_get_nav_menu_items( $menu->term_id, array( 'update_post_term_cache' => false ) ); 260 wp_cache_set( 'wp_nav_menu_' . $args->theme_location, $menu_items ); 261 } 262 } 263 256 264 /* 257 265 * If no menu was found: 258 266 * - Fall back (if one was specified), or bail.