Changeset 14942
- Timestamp:
- 05/26/2010 02:18:46 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/nav-menu-template.php
r14924 r14942 334 334 $menu_item->object_id == $queried_object_id && 335 335 ( 336 ( ! empty( $home_page_id ) && 'post_type' == $menu_item->type && $wp_query->is_home && $home_page_id = $menu_item->object_id ) ||336 ( ! empty( $home_page_id ) && 'post_type' == $menu_item->type && $wp_query->is_home && $home_page_id == $menu_item->object_id ) || 337 337 ( 'post_type' == $menu_item->type && $wp_query->is_singular ) || 338 338 ( 'taxonomy' == $menu_item->type && ( $wp_query->is_category || $wp_query->is_tag || $wp_query->is_tax ) ) 339 339 ) 340 340 ) { 341 $menu_items[$key]->classes = trim( $menu_item ->classes . ' ' . 'current-menu-item' );341 $menu_items[$key]->classes = trim( $menu_items[$key]->classes . ' ' . 'current-menu-item' ); 342 342 $active_parent_item_ids[] = (int) $menu_item->menu_item_parent; 343 343 $active_parent_object_ids[] = (int) $menu_item->post_parent; … … 357 357 } 358 358 } 359 360 // back-compat with wp_page_menu: add "current_page_parent" to static home page link for any non-page query 361 if ( ! empty( $home_page_id ) && 'post_type' == $menu_item->type && empty( $wp_query->is_page ) && $home_page_id == $menu_item->object_id ) 362 $menu_items[$key]->classes = trim( $menu_items[$key]->classes . ' ' . 'current_page_parent' ); 359 363 } 360 364
Note: See TracChangeset
for help on using the changeset viewer.