[wp-trac] [WordPress Trac] #57140: Add filters to allow themes and plugins to pass HTML attributes to different Nav Walker output

WordPress Trac noreply at wordpress.org
Tue Jun 27 15:25:17 UTC 2023


#57140: Add filters to allow themes and plugins to pass HTML attributes to
different Nav Walker output
-------------------------------------------------+-------------------------
 Reporter:  davidwebca                           |       Owner:  audrasjb
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.3
Component:  Menus                                |     Version:  3.0
 Severity:  minor                                |  Resolution:  fixed
 Keywords:  has-patch needs-testing has-unit-    |     Focuses:
  tests                                          |  javascript, template
-------------------------------------------------+-------------------------
Changes (by audrasjb):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"56067" 56067]:
 {{{
 #!CommitTicketReference repository="" revision="56067"
 Menus: Allow themes and plugins to pass HTML attributes to various Nav
 Walker outputs.

 This introduces a new set of hooks that can be used to filter various HTML
 elements of the Nav Walker, in order to output the desired HTML
 attributes:

 - List items: `nav_menu_item_attributes`
 - Submenu `<ul>` element: `nav_menu_submenu_attributes`

 Props davidwebca, danyk4, costdev, peterwilsoncc, audrasjb, oglekler.
 Fixes #57140.
 }}}

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


More information about the wp-trac mailing list