Add menu-item-object-$object class. props filosofo, fixes #14053.

git-svn-id: https://develop.svn.wordpress.org/trunk@16095 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-10-29 22:49:42 +00:00
parent d96e57bed8
commit 6524af3915
1 changed files with 1 additions and 0 deletions

View File

@ -320,6 +320,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
$classes = (array) $menu_item->classes;
$classes[] = 'menu-item';
$classes[] = 'menu-item-type-' . $menu_item->type;
$classes[] = 'menu-item-object-' . $menu_item->object;
// if the menu item corresponds to a taxonomy term for the currently-queried non-hierarchical post object
if ( $wp_query->is_singular && 'taxonomy' == $menu_item->type && in_array( $menu_item->object_id, $possible_object_parents ) ) {