wp-content/themes/twentynineteen/inc/template-functions.php:182Handles WCAG 2.0 attributes for dropdown menus.
$attsarray$titlestring
$targetstring
$relstring
$hrefstring
$ariastring
$itemWP_Poststring[]function twentynineteen_nav_menu_link_attributes( $atts, $item ) { // Add [aria-haspopup] and [aria-expanded] to menu items that have children. $item_has_children = in_array( 'menu-item-has-children', $item->classes, true ); if ( $item_has_children ) { $atts['aria-haspopup'] = 'true'; $atts['aria-expanded'] = 'false'; } return $atts;}One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
$args added.verified against sourcesrc/wp-content/themes/twentynineteen/inc/template-functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.