wpseek.com
A WordPress-centric search engine for devs and theme authors
block_core_navigation_add_directives_to_overlay_close › WordPress Function
Since6.5.0
Deprecatedn/a
› block_core_navigation_add_directives_to_overlay_close ( $tags )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
| Codex: |
Add Interactivity API directives to the navigation-overlay-close block markup using the Tag Processor.
Source
function block_core_navigation_add_directives_to_overlay_close( $tags ) {
// Find all navigation-overlay-close buttons.
while ( $tags->next_tag(
array(
'tag_name' => 'BUTTON',
'class_name' => 'wp-block-navigation-overlay-close',
)
) ) {
// Add the same close directive as the default close button.
$tags->set_attribute( 'data-wp-on--click', 'actions.closeMenuOnClick' );
}
return $tags->get_updated_html();
}