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; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.7.0 | Introduced. |