[ Index ]

PHP Cross Reference of WordPress




/wp-content/themes/twentytwentyone/inc/ -> menu-functions.php (summary)

Functions and filters related to the menus. Makes the default WordPress navigation use an HTML structure similar to the Navigation block.

File Size: 101 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 4 functions


Functions that are not part of a class:

twenty_twenty_one_add_sub_menu_toggle( $output, $item, $depth, $args )   X-Ref
Add a button to top-level menu items that has sub-menus.
An icon is added using CSS depending on the value of aria-expanded.

param: string $output Nav menu item start element.
param: object $item   Nav menu item.
param: int    $depth  Depth.
param: object $args   Nav menu args.
return: string Nav menu item start element.
since: Twenty Twenty-One 1.0

twenty_twenty_one_get_social_link_svg( $uri, $size = 24 )   X-Ref
Detects the social network from a URL and returns the SVG code for its icon.

param: string $uri  Social link.
param: int    $size The icon size in pixels.
return: string
since: Twenty Twenty-One 1.0

twenty_twenty_one_nav_menu_social_icons( $item_output, $item, $depth, $args )   X-Ref
Displays SVG icons in the footer navigation.

param: string   $item_output The menu item's starting HTML output.
param: WP_Post  $item        Menu item data object.
param: int      $depth       Depth of the menu. Used for padding.
param: stdClass $args        An object of wp_nav_menu() arguments.
return: string The menu item output with social icon.
since: Twenty Twenty-One 1.0

twenty_twenty_one_add_menu_description_args( $args, $item, $depth )   X-Ref
Filters the arguments for a single nav menu item.

param: stdClass $args  An object of wp_nav_menu() arguments.
param: WP_Post  $item  Menu item data object.
param: int      $depth Depth of menu item. Used for padding.
return: stdClass
since: Twenty Twenty-One 1.0

Generated: Wed Aug 10 01:00:02 2022 Cross-referenced by PHPXref 0.7.1