Astra_AMP::add_nav_toggle_attrs( string $input )

Add the nav toggle data attributes.


Description


Parameters

$input

(string) (Required) the data attrs already existing in nav toggle.


Return

(string)


Source

File: inc/compatibility/class-astra-amp.php

		public function add_nav_toggle_attrs( $input ) {
			$input .= ' on="tap:AMP.setState( { astraAmpMenuExpanded: ! astraAmpMenuExpanded } ),astra-body.toggleClass(class=ast-main-header-nav-open)" ';
			$input .= ' [class]="\'menu-toggle main-header-menu-toggle  ast-mobile-menu-buttons-minimal\' + ( astraAmpMenuExpanded ? \' toggled\' : \'\' )" ';
			$input .= ' aria-expanded="false" ';
			$input .= ' [aria-expanded]="astraAmpMenuExpanded ? \'true\' : \'false\'" ';

			return $input;
		}

User Contributed Notes

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