[wp-trac] [WordPress Trac] #40947: Backward compatability _sort_nav_menu_items

WordPress Trac noreply at wordpress.org
Thu Jun 8 10:50:37 UTC 2017


#40947: Backward compatability _sort_nav_menu_items
--------------------------+-----------------------------
 Reporter:  PieWP         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Menus         |    Version:  4.7
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 The function {{{ _sort_nav_menu_items() }}} does no longer seem to be
 backwards compatible. This is due to the global {{{ $_menu_item_sort_prop
 }}} no longer being set.

 Its sibling function {{{ wp_get_nav_menu_items() }}} should be responsible
 for setting this var and in the doc also actually refers to it, codewise
 it does nothing with it though.

 I've attached a file fixing the backwards compatibility, not quite sure
 what is more important though. Fixing backwards compatibility or
 removing/cleaning up an additional global var. Either way I suggest either
 the patch gets applied or the PHP doc of {{{ $_menu_item_sort_prop }}}
 gets updated.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40947>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list