Assign menu-item-home also when menu item isn't current. props filosofo, see #14053 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@15302 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
dbcb4eeaa8
commit
c118ae7ec8
@ -363,7 +363,6 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
|
||||
}
|
||||
|
||||
if ( untrailingslashit($current_url) == home_url() ) {
|
||||
$classes[] = 'menu-item-home';
|
||||
// Back compat for home limk to match wp_page_menu()
|
||||
$classes[] = 'current_page_item';
|
||||
}
|
||||
@ -371,6 +370,9 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
|
||||
$active_parent_object_ids[] = (int) $menu_item->post_parent;
|
||||
$active_object = $menu_item->object;
|
||||
}
|
||||
|
||||
if ( untrailingslashit($item_url) == home_url() )
|
||||
$classes[] = 'menu-item-home';
|
||||
}
|
||||
|
||||
// back-compat with wp_page_menu: add "current_page_parent" to static home page link for any non-page query
|
||||
|
Loading…
Reference in New Issue
Block a user