Astra_AMP::nav_menu_wrapper( Array $attr )

Add AMP attributes to the nav menu wrapper.


Description


Parameters

$attr

(Array) (Required) HTML attributes to be added to the nav menu wrapper.


Return

(Array) updated HTML attributes.


Source

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

		public function nav_menu_wrapper( $attr ) {
			$attr['[class]']         = '( astraAmpMenuExpanded ? \'ast-main-header-bar-alignment toggle-on\' : \'ast-main-header-bar-alignment\' )';
			$attr['aria-expanded']   = 'false';
			$attr['[aria-expanded]'] = '(astraAmpMenuExpanded ? \'true\' : \'false\')';

			return $attr;
		}

Changelog

Changelog
Version Description
1.7.0 Introduced.

User Contributed Notes

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