wp-content/themes/twentynineteen/inc/icon-functions.php:72Adds a dropdown icon to top-level menu items.
$item_outputstring$itemWP_Post$depthint$argsstdClassstringfunction twentynineteen_add_dropdown_icons( $item_output, $item, $depth, $args ) { // Only add class to 'top level' items on the 'primary' menu. if ( ! isset( $args->theme_location ) || 'menu-1' !== $args->theme_location ) { return $item_output; } if ( in_array( 'mobile-parent-nav-menu-item', $item->classes, true ) && isset( $item->original_id ) ) { // Inject the keyboard_arrow_left SVG inside the parent nav menu item, and let the item link to the parent item. // @todo Only do this for nested submenus? If on a first-level submenu, then really the link could be "#" since the desire is to remove the target entirely. $link = sprintf( '<button class="menu-item-link-return" tabindex="-1">%s', twentynineteen_get_icon_svg( 'chevron_left', 24 ) ); // Replace opening <a> with <button>. $item_output = preg_replace( '/<a\s.*?>/', $link, $item_output, 1 // Limit. ); // Replace closing </a> with </button>. $item_output = preg_replace( '#</a>#i', '</button>', $item_output, 1 // Limit. ); } elseif ( in_array( 'menu-item-has-children', $item->classes, true ) ) { // Add SVG icon to parent items. $icon = twentynineteen_get_icon_svg( 'keyboard_arrow_down', 24 ); $item_output .= sprintf( '<button class="submenu-expand" tabindex="-1">%s</button>', $icon ); } return $item_output;}Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-content/themes/twentynineteen/inc/icon-functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.