Changeset 56816 for trunk/src/wp-includes/blocks/navigation.php
- Timestamp:
- 10/10/2023 11:27:50 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/navigation.php
r56710 r56816 697 697 $close_button_directives = ''; 698 698 if ( $should_load_view_script ) { 699 $nav_element_context = wp_json_encode( 700 array( 701 'core' => array( 702 'navigation' => array( 703 'overlayOpenedBy' => array(), 704 'type' => 'overlay', 705 'roleAttribute' => '', 706 'ariaLabel' => __( 'Menu' ), 707 ), 708 ), 709 ), 710 JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP 711 ); 699 712 $nav_element_directives = ' 700 713 data-wp-interactive 701 data-wp-context=\' { "core": { "navigation": { "overlayOpenedBy": {}, "type": "overlay", "roleAttribute": "" } } }\'714 data-wp-context=\'' . $nav_element_context . '\' 702 715 '; 703 716 $open_button_directives = ' … … 715 728 $responsive_dialog_directives = ' 716 729 data-wp-bind--aria-modal="selectors.core.navigation.ariaModal" 730 data-wp-bind--aria-label="selectors.core.navigation.ariaLabel" 717 731 data-wp-bind--role="selectors.core.navigation.roleAttribute" 718 732 data-wp-effect="effects.core.navigation.focusFirstElement" … … 724 738 725 739 $responsive_container_markup = sprintf( 726 '<button aria-haspopup="true" %3$s class="%6$s" %1 1$s>%9$s</button>727 <div class="%5$s" style="%7$s" id="%1$s" %1 2$s>740 '<button aria-haspopup="true" %3$s class="%6$s" %10$s>%8$s</button> 741 <div class="%5$s" style="%7$s" id="%1$s" %11$s> 728 742 <div class="wp-block-navigation__responsive-close" tabindex="-1"> 729 <div class="wp-block-navigation__responsive-dialog" aria-label="%8$s" %13$s>730 <button %4$s class="wp-block-navigation__responsive-container-close" %1 4$s>%10$s</button>743 <div class="wp-block-navigation__responsive-dialog" %12$s> 744 <button %4$s class="wp-block-navigation__responsive-container-close" %13$s>%9$s</button> 731 745 <div class="wp-block-navigation__responsive-container-content" id="%1$s-content"> 732 746 %2$s … … 742 756 esc_attr( implode( ' ', $open_button_classes ) ), 743 757 esc_attr( safecss_filter_attr( $colors['overlay_inline_styles'] ) ), 744 __( 'Menu' ),745 758 $toggle_button_content, 746 759 $toggle_close_button_content,
Note: See TracChangeset
for help on using the changeset viewer.