Menu notice and stlying fixes. Props filosofo. fixes #12812
git-svn-id: http://svn.automattic.com/wordpress/trunk@14905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4ec5fd4f13
commit
cf3466579b
|
@ -431,7 +431,9 @@ div.menu li {
|
|||
display:block;
|
||||
}
|
||||
#access ul li.current_page_item a ,
|
||||
#access ul li.current-menu-item a {
|
||||
#access ul li.current-menu-ancestor a,
|
||||
#access ul li.current-menu-item a,
|
||||
#access ul li.current-menu-parent a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
|
|
@ -361,8 +361,14 @@ function _wp_menu_item_classes_by_context( &$menu_items = array() ) {
|
|||
|
||||
// set parent's class
|
||||
foreach ( (array) $menu_items as $key => $parent_item ) {
|
||||
if ( 'post_type' == $parent_item->type && is_post_type_hierarchical( $queried_object->post_type ) && in_array( $parent_item->object_id, $queried_object->ancestors ) )
|
||||
$menu_items[$key]->classes = trim( $parent_item->classes . ' ' . 'current-' . $queried_object->post_type . '-ancestor' );
|
||||
if (
|
||||
isset( $parent_item->type ) &&
|
||||
'post_type' == $parent_item->type &&
|
||||
! empty( $queried_object->post_type ) &&
|
||||
is_post_type_hierarchical( $queried_object->post_type ) &&
|
||||
in_array( $parent_item->object_id, $queried_object->ancestors )
|
||||
)
|
||||
$menu_items[$key]->classes = trim( $parent_item->classes . ' ' . 'current-' . $queried_object->post_type . '-ancestor current-menu-ancestor' );
|
||||
if ( in_array( $parent_item->db_id, $active_parent_item_ids ) )
|
||||
$menu_items[$key]->classes = trim( $parent_item->classes . ' ' . 'current-menu-parent' );
|
||||
if ( in_array( $parent_item->object_id, $active_parent_object_ids ) )
|
||||
|
|
Loading…
Reference in New Issue