Changeset 57619 for trunk/src/wp-includes/blocks/navigation.php
- Timestamp:
- 02/13/2024 01:10:05 PM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/navigation.php
r57578 r57619 558 558 } 559 559 // When adding to this array be mindful of security concerns. 560 $nav_element_context = wp_json_encode(560 $nav_element_context = data_wp_context( 561 561 array( 562 562 'overlayOpenedBy' => array(), … … 564 564 'roleAttribute' => '', 565 565 'ariaLabel' => __( 'Menu' ), 566 ), 567 JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP 566 ) 568 567 ); 569 568 $nav_element_directives = ' 570 data-wp-interactive=\'{"namespace":"core/navigation"}\' 571 data-wp-context=\'' . $nav_element_context . '\' 572 '; 569 data-wp-interactive="core/navigation"' 570 . $nav_element_context; 573 571 574 572 /* … … 781 779 ) ) { 782 780 // Add directives to the parent `<li>`. 783 $tags->set_attribute( 'data-wp-interactive', ' { "namespace": "core/navigation" }' );781 $tags->set_attribute( 'data-wp-interactive', 'core/navigation' ); 784 782 $tags->set_attribute( 'data-wp-context', '{ "submenuOpenedBy": {}, "type": "submenu" }' ); 785 783 $tags->set_attribute( 'data-wp-watch', 'callbacks.initMenu' );
Note: See TracChangeset
for help on using the changeset viewer.