Classes for posts and terms in the menus. see #13379
git-svn-id: http://svn.automattic.com/wordpress/trunk@14891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
98f19bc328
commit
31b8da5ae5
|
@ -70,7 +70,12 @@ class Walker_Nav_Menu extends Walker {
|
|||
|
||||
$classes = $value = '';
|
||||
|
||||
$classes = array( 'menu-item', 'menu-item-type-'. $item->type, $item->classes, 'menu-item-object-'. $item->object );
|
||||
$classes = array( 'menu-item', 'menu-item-type-' . $item->type, $item->classes );
|
||||
|
||||
if ( 'custom' != $item->type ) {
|
||||
$classes[] = 'menu-item-object-' . $item->object;
|
||||
$classes[] = 'menu-item-object-' . $item->type . '-' . $item->object_id;
|
||||
}
|
||||
|
||||
$classes = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );
|
||||
$classes = ' class="' . esc_attr( $classes ) . '"';
|
||||
|
|
Loading…
Reference in New Issue