Astra_AMP::add_search_slide_toggle_attrs( string $input )
Add search slide data attributes.
Description
Parameters
- $input
-
(string) (Required) the data attrs already existing in the nav.
Return
(string)
Source
File: inc/compatibility/class-astra-amp.php
public function add_search_slide_toggle_attrs( $input ) { $input .= ' on="tap:AMP.setState( { astraAmpSlideSearchMenuExpanded: ! astraAmpSlideSearchMenuExpanded } )" '; $input .= ' [class]="( astraAmpSlideSearchMenuExpanded ? \'ast-search-menu-icon slide-search ast-dropdown-active\' : \'ast-search-menu-icon slide-search\' )" '; $input .= ' aria-expanded="false" [aria-expanded]="astraAmpSlideSearchMenuExpanded ? \'true\' : \'false\'" '; return $input; }
Expand full source code Collapse full source code View on Trac