WordPress.org
News
Showcase
Hosting
Extend
Themes
Plugins
Patterns
Blocks
Openverse
↗
︎
Learn
Learn WordPress
Documentation
Forums
Developers
WordPress.tv
↗
︎
Community
Make WordPress
Photo Directory
Five for the Future
Events
Job Board
↗
︎
About
About WordPress
Enterprise
Gutenberg
↗
︎
Get WordPress
Search Trac
Get WordPress
Make WordPress Core
Blog
Handbook
Tickets
Components
Browse Source
Trac Timeline
Create a New Ticket
Search:
Login
Notifications
Context Navigation
Back to Ticket #21070
Ticket #21070
: functions.php
File functions.php,
223 bytes
(added by
bjornjohansen
,
12 years ago
)
Example usage of the filter
Line
1
<?php
2
3
function
my_nav_submenu_css_class
(
$classes
,
$depth
)
{
4
$classes
[]
=
sprintf
(
'sub-menu-depth-%d'
,
$depth
);
5
return
$classes
;
6
}
7
8
add_filter
(
'nav_submenu_css_class'
,
'my_nav_submenu_css_class'
,
10
,
2
);
9
Trac UI Preferences
Download in other formats:
Original Format