WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/29/2014 03:44:26 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Change the default orderby value in wp_get_nav_menus() to 'name'.

props voldemortensen, igmoweb.
fixes #29460.

File:
1 edited

Legend:

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

    r29293 r29792  
    278278    // get the first menu that has items if we still can't find a menu
    279279    if ( ! $menu && !$args->theme_location ) {
    280         $menus = wp_get_nav_menus( array( 'orderby' => 'name' ) );
     280        $menus = wp_get_nav_menus();
    281281        foreach ( $menus as $menu_maybe ) {
    282282            if ( $menu_items = wp_get_nav_menu_items( $menu_maybe->term_id, array( 'update_post_term_cache' => false ) ) ) {
Note: See TracChangeset for help on using the changeset viewer.