mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 18:13:00 +01:00
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:
parent
d96e57bed8
commit
6524af3915
@ -320,6 +320,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
|
|||||||
$classes = (array) $menu_item->classes;
|
$classes = (array) $menu_item->classes;
|
||||||
$classes[] = 'menu-item';
|
$classes[] = 'menu-item';
|
||||||
$classes[] = 'menu-item-type-' . $menu_item->type;
|
$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 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 ) ) {
|
if ( $wp_query->is_singular && 'taxonomy' == $menu_item->type && in_array( $menu_item->object_id, $possible_object_parents ) ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user