WordPress.org

Make WordPress Core

Ticket #21070: functions.php

File functions.php, 223 bytes (added by bjornjohansen, 22 months ago)

Example usage of the filter

Line 
1<?php
2
3function my_nav_submenu_css_class( $classes, $depth )  {
4        $classes[] = sprintf( 'sub-menu-depth-%d', $depth );
5        return $classes;
6}
7
8add_filter( 'nav_submenu_css_class', 'my_nav_submenu_css_class', 10, 2 );
9