[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 Sep 2 02:32:57 UTC 2014


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

 * keywords:  has-patch => dev-feedback
 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 I'm concerned that this will suddenly change people's sites as they were
 used to it being a different sort. While MySQL makes zero guarantees as to
 the order of records when there is no ORDER BY, they are more likely to be
 returned in insertion order than by name.

 wp_get_nav_menus() specifically is 'orderby' => 'none' by default, which
 seems to be the bug here.

 I'm not sure what to do or whether this actually has real world
 implications, but I want another opinion.

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


More information about the wp-trac mailing list