Make WordPress Core


Ignore:
Timestamp:
09/07/2014 10:03:06 AM (10 years ago)
Author:
SergeyBiryukov
Message:

Use get_registered_nav_menus() in has_nav_menu().

props voldemortensen.
fixes #29461.

File:
1 edited

Legend:

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

    r28836 r29717  
    143143 */
    144144function has_nav_menu( $location ) {
    145     global $_wp_registered_nav_menus;
    146 
    147     if ( ! isset( $_wp_registered_nav_menus[ $location ] ) ) {
     145    $registered_nav_menus = get_registered_nav_menus();
     146    if ( ! isset( $registered_nav_menus[ $location ] ) ) {
    148147        return false;
    149148    }
Note: See TracChangeset for help on using the changeset viewer.