WordPress.org

Make WordPress Core

Changeset 32763


Ignore:
Timestamp:
06/14/2015 05:13:23 PM (4 years ago)
Author:
ocean90
Message:

Nav menus: Reset the fallback_cb default argument in wp_nav_menu in case of a Customizer preview.

props westonruter.
see #32576.

File:
1 edited

Legend:

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

    r32612 r32763  
    231231    'depth' => 0, 'walker' => '', 'theme_location' => '' );
    232232
     233    // Prevent a fallback_cb in Customizer Preview to assist with has_nav_menu() and partial refresh.
     234    if ( is_customize_preview() ) {
     235        $defaults['fallback_cb'] = '';
     236    }
     237
    233238    $args = wp_parse_args( $args, $defaults );
    234239    /**
Note: See TracChangeset for help on using the changeset viewer.