Changeset 47557 for trunk/src/wp-includes/nav-menu-template.php
- Timestamp:
- 04/09/2020 03:41:04 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/nav-menu-template.php
r47550 r47557 393 393 394 394 // If the menu item corresponds to a taxonomy term for the currently queried non-hierarchical post object. 395 if ( $wp_query->is_singular && 'taxonomy' == $menu_item->type && in_array( $menu_item->object_id, $possible_object_parents ) ) { 395 if ( $wp_query->is_singular && 'taxonomy' == $menu_item->type 396 && in_array( (int) $menu_item->object_id, $possible_object_parents, true ) 397 ) { 396 398 $active_parent_object_ids[] = (int) $menu_item->object_id; 397 399 $active_parent_item_ids[] = (int) $menu_item->db_id; … … 405 407 || ( 'post_type' == $menu_item->type && $wp_query->is_singular ) 406 408 || ( 'taxonomy' == $menu_item->type 407 && ( $wp_query->is_category || $wp_query->is_tag || $wp_query->is_tax ) && $queried_object->taxonomy == $menu_item->object ) 409 && ( $wp_query->is_category || $wp_query->is_tag || $wp_query->is_tax ) 410 && $queried_object->taxonomy == $menu_item->object ) 408 411 ) 409 412 ) { … … 526 529 && ! empty( $queried_object->post_type ) 527 530 && is_post_type_hierarchical( $queried_object->post_type ) 528 && in_array( $parent_item->object_id, $queried_object->ancestors)531 && in_array( (int) $parent_item->object_id, $queried_object->ancestors, true ) 529 532 && $parent_item->object != $queried_object->ID 530 533 ) || … … 534 537 'taxonomy' == $parent_item->type 535 538 && isset( $possible_taxonomy_ancestors[ $parent_item->object ] ) 536 && in_array( $parent_item->object_id, $possible_taxonomy_ancestors[ $parent_item->object ])539 && in_array( (int) $parent_item->object_id, $possible_taxonomy_ancestors[ $parent_item->object ], true ) 537 540 && ( 538 541 ! isset( $queried_object->term_id ) ||
Note: See TracChangeset
for help on using the changeset viewer.