[wp-trac] [WordPress Trac] #28126: wp_nav_menu defaults to 'first' non-empty menu, without specifying an order.

WordPress Trac noreply at wordpress.org
Tue Jun 24 17:24:25 UTC 2014


#28126: wp_nav_menu defaults to 'first' non-empty menu, without specifying an
order.
--------------------------+-----------------------------
 Reporter:  thingalon     |       Owner:  wonderboymusic
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.0
Component:  Menus         |     Version:  3.9
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------
Changes (by wonderboymusic):

 * owner:   => wonderboymusic
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"28826"]:
 {{{
 #!CommitTicketReference repository="" revision="28826"
 When selecting a fallback menu in `wp_nav_menu()`, the "first" menu is
 retrieved from an unsorted query. When retrieving a fallback menu, pass
 `array( 'orderby' => 'name' )` to `wp_get_nav_menus()` to return a menu
 consistently.

 Props lukecarbis.
 Fixes #28126.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28126#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list