Changeset 40665
- Timestamp:
- 05/14/2017 03:37:45 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-walker-nav-menu.php
r40537 r40665 60 60 $indent = str_repeat( $t, $depth ); 61 61 62 // Default class. 63 $classes = array( 'sub-menu' ); 64 62 65 /** 63 66 * Filters the CSS class(es) applied to a menu list element. … … 69 72 * @param int $depth Depth of menu item. Used for padding. 70 73 */ 71 72 $classes = array( 'sub-menu' ); 73 $classes = apply_filters( 'nav_menu_submenu_css_class', $classes, $args, $depth ); 74 $class_names = join( ' ', $classes ); 75 76 $output .= "{$n}{$indent}<ul class='" . esc_attr( $class_names ) . "'>{$n}"; 74 $class_names = join( ' ', apply_filters( 'nav_menu_submenu_css_class', $classes, $args, $depth ) ); 75 $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; 76 77 $output .= "{$n}{$indent}<ul $class_names>{$n}"; 77 78 } 78 79
Note: See TracChangeset
for help on using the changeset viewer.