[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/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

  twenty_twenty_one_add_sub_menu_toggle()
  twenty_twenty_one_get_social_link_svg()
  twenty_twenty_one_nav_menu_social_icons()
  twenty_twenty_one_add_menu_description_args()

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.

return: string Nav menu item start element.
param: string $output Nav menu item start element.
param: object $item   Nav menu item.
param: int    $depth  Depth.
param: object $args   Nav menu args.
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.

return: string
param: string $uri  Social link.
param: int    $size The icon size in pixels.
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.

return: string The menu item output with social icon.
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.
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.

return: stdClass
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.
since: Twenty Twenty-One 1.0



Generated: Thu Mar 28 01:00:02 2024 Cross-referenced by PHPXref 0.7.1