[wp-trac] [WordPress Trac] #39077: Navigation menu items should be defined as being hierarchical

WordPress Trac noreply at wordpress.org
Sun Dec 4 21:20:30 UTC 2016


#39077: Navigation menu items should be defined as being hierarchical
--------------------------+-----------------------------
 Reporter:  schlessera    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Menus         |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Menu items are hierarchical in nature, as each menu item can be attached
 as a child to a parent item. This is what allows one to build submenus at
 differing levels.

 These hierarchical relationships are persisted into the database using the
 `post_parent` column to attach parent IDs to child IDs.

 However, when the `nav_menu_item` is registered during the bootstrapping
 process, it is defined as being `hierarchical => false`, which is
 conceptually wrong. It just happens to be irrelevant, because the user
 interface for menus is a custom implementation that considerably differs
 from standard post list tables.

 As these `nav_menu_item` elements might need to be iterated over through
 other means than the menu UI, they should be correctly represented as
 being hierarchical in nature (and thus making use of the `post_parent`
 database table column).

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


More information about the wp-trac mailing list