WordPress.org

Make WordPress Core

Changeset 14891


Ignore:
Timestamp:
05/25/2010 04:51:09 PM (8 years ago)
Author:
ryan
Message:

Classes for posts and terms in the menus. see #13379

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/nav-menu-template.php

    r14881 r14891  
    7171        $classes = $value = '';
    7272
    73         $classes = array( 'menu-item', 'menu-item-type-'. $item->type, $item->classes, 'menu-item-object-'. $item->object );
     73        $classes = array( 'menu-item', 'menu-item-type-' . $item->type, $item->classes );
     74
     75        if ( 'custom' != $item->type ) {
     76            $classes[] = 'menu-item-object-' . $item->object;
     77            $classes[] = 'menu-item-object-' . $item->type . '-' . $item->object_id;
     78        }
    7479
    7580        $classes = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );
Note: See TracChangeset for help on using the changeset viewer.