wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
block_core_navigation_add_directives_to_overlay_close › WordPress Function
Seit6.5.0
Veraltetn/v
› block_core_navigation_add_directives_to_overlay_close ( $tags )
| Parameter: |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Add Interactivity API directives to the navigation-overlay-close block markup using the Tag Processor.
Quellcode
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();
}