Make WordPress Core

Ticket #29460: 29460.diff

File 29460.diff, 1.1 KB (added by voldemortensen, 10 years ago)
  • wp-includes/nav-menu-template.php

     
    277277
    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 ) ) ) {
    283283                                $menu = $menu_maybe;
  • wp-includes/nav-menu.php

     
    466466 * @return array menu objects
    467467 */
    468468function wp_get_nav_menus( $args = array() ) {
    469         $defaults = array( 'hide_empty' => false, 'orderby' => 'none' );
     469        $defaults = array( 'hide_empty' => false, 'orderby' => 'name' );
    470470        $args = wp_parse_args( $args, $defaults );
    471471
    472472        /**