Changeset 56065 for trunk/src/wp-includes/blocks/navigation-link.php
- Timestamp:
- 06/27/2023 02:20:18 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/navigation-link.php
r55542 r56065 182 182 $css_classes = trim( implode( ' ', $classes ) ); 183 183 $has_submenu = count( $block->inner_blocks ) > 0; 184 $is_active = ! empty( $attributes['id'] ) && ( get_queried_object_id() === (int) $attributes['id'] ); 184 $kind = empty( $attributes['kind'] ) ? 'post_type' : str_replace( '-', '_', $attributes['kind'] ); 185 $is_active = ! empty( $attributes['id'] ) && get_queried_object_id() === (int) $attributes['id'] && ! empty( get_queried_object()->$kind ); 185 186 186 187 $wrapper_attributes = get_block_wrapper_attributes(
Note: See TracChangeset
for help on using the changeset viewer.