Make WordPress Core


Ignore:
Timestamp:
09/06/2013 06:09:24 PM (12 years ago)
Author:
wonderboymusic
Message:

Introduce wp_using_ext_object_cache() - mimic wp_suspend_cache_invalidation() and discourage direct access to $_wp_using_ext_object_cache, cleaning up importing of globals in functions and provides function to modify that global. Loads the packaged object cache when an external cache hasn't been loaded or doesn't contain wp_cache_init().

Fixes #21401.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu.php

    r25196 r25289  
    477477 */
    478478function wp_get_nav_menu_items( $menu, $args = array() ) {
    479     global $_wp_using_ext_object_cache;
    480 
    481479    $menu = wp_get_nav_menu_object( $menu );
    482480
     
    505503
    506504    // Get all posts and terms at once to prime the caches
    507     if ( empty( $fetched[$menu->term_id] ) || $_wp_using_ext_object_cache ) {
     505    if ( empty( $fetched[$menu->term_id] ) || wp_using_ext_object_cache() ) {
    508506        $fetched[$menu->term_id] = true;
    509507        $posts = array();
Note: See TracChangeset for help on using the changeset viewer.