[wp-trac] [WordPress Trac] #23902: Classes set with nav_menu_css_class are not accessible in walker_nav_menu_start_el

WordPress Trac noreply at wordpress.org
Fri Mar 29 20:46:34 UTC 2013


#23902: Classes set with nav_menu_css_class are not accessible in
walker_nav_menu_start_el
-----------------------------+--------------------------
 Reporter:  jamesmehorter    |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Menus
  Version:  3.5.1            |   Severity:  normal
 Keywords:                   |
-----------------------------+--------------------------
 Hello,

 If you use the filter hook nav_menu_css_class to add classes to a menu
 item, those classes are not available in other menu filter hooks like
 walker_nav_menu_start_el. This can be found in the start_el function in
 wp-includes/nav-menu-template.php. I would think line 75:

 {{{
 $class_names = join( ' ', apply_filters( 'nav_menu_css_class',
 array_filter( $classes ), $item, $args ) );
 }}}

 Should merge those $class_names back into $item.

 Thanks

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23902>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list