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;
		}

User Contributed Notes

You must log in before being able to contribute a note or feedback.