Assign menu-item-home also when menu item isn't current. props filosofo, see #14053 for trunk.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
27e720b359
commit
b7ac72a92b
|
@ -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