Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#13366 closed enhancement (fixed)

Enhance item filtering capabilities on walk_nav_menu_tree

Reported by: tomtomp Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Menus Keywords:
Focuses: Cc:


Could it be possible in "wp-includes/nav-menu-template.php" at line 104 to change :

$output .= apply_filters( 'wp_get_nav_menu_item', $item_output, $args);


$output .= apply_filters( 'wp_get_nav_menu_item', $item_output, $args, $item );

so it will possible to insert information (item ID, alt, ...) trough sprintf before or after item


Change History (1)

comment:1 @ryan5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [14600]) s/wp_get_nav_menu_item/walker_nav_menu_start_el/ to be more specific. Pass all start_el() args to the filter. Props tomtomp. fixes #13366

Note: See TracTickets for help on using tickets.