WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/10/2013 11:29:04 PM (8 years ago)
Author:
wonderboymusic
Message:

Use wp_get_nav_menus() instead of get_terms('nav_menu') in WP_Nav_Menu_Widget to preserve use of `wp_get_nav_menus' filter.

Props Frank Klein.
Fixes #25263.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-widgets.php

    r25298 r25332  
    11351135
    11361136        // Get menus
    1137         $menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) );
     1137        $menus = wp_get_nav_menus( array( 'orderby' => 'name' ) );
    11381138
    11391139        // If no menus exists, direct the user to go and create some.
Note: See TracChangeset for help on using the changeset viewer.