Make WordPress Core

Ticket #27735: 27735.patch

File 27735.patch, 532 bytes (added by SergeyBiryukov, 10 years ago)
  • src/wp-includes/nav-menu.php

     
    142142 * @return bool Whether location has a menu.
    143143 */
    144144function has_nav_menu( $location ) {
     145        global $_wp_registered_nav_menus;
     146
     147        if ( ! isset( $_wp_registered_nav_menus[ $location ] ) ) {
     148                return false;
     149        }
     150
    145151        $locations = get_nav_menu_locations();
    146152        return ( ! empty( $locations[ $location ] ) );
    147153}