From 1345e33a21a322c5918d904b2ac6b93ca446905d Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Sun, 23 Apr 2017 07:15:47 +0000 Subject: [PATCH] Menus: Add filter to sub-menu class in nav menus. Add new filter `nav_menu_submenu_css_class` to the `Walker_Nav_Menu::start_el()` method, allowing themers to modify the sub menu classes output by `wp_nav_menu()`. Props: csloisel, darthaud, raisonon. Fixes: #36163. git-svn-id: https://develop.svn.wordpress.org/trunk@40537 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-walker-nav-menu.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/class-walker-nav-menu.php b/src/wp-includes/class-walker-nav-menu.php index 4c1a1f2c91..c97188b473 100644 --- a/src/wp-includes/class-walker-nav-menu.php +++ b/src/wp-includes/class-walker-nav-menu.php @@ -58,7 +58,22 @@ class Walker_Nav_Menu extends Walker { $n = "\n"; } $indent = str_repeat( $t, $depth ); - $output .= "{$n}{$indent}