• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress a2z

WordPress a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / Files / inc/menu-functions.php


Lines:

1 to 27 of 27
<?php

/**
 * Functions and filters related to the menus.
 *
 * Makes the default WordPress navigation use an HTML structure similar
 * to the Navigation block.
 *
 * @link https://make.wordpress.org/themes/2020/07/06/printing-navigation-block-html-from-a-legacy-menu-in-themes/
 *
 * @package WordPress
 * @subpackage Twenty_Twenty_One
 * @since Twenty Twenty-One 1.0
 */

/* function twenty_twenty_one_add_sub_menu_toggle() – Add a button to top-level menu items that has sub-menus. */
add_filter( 'walker_nav_menu_start_el', 'twenty_twenty_one_add_sub_menu_toggle', 10, 4 );

/* function twenty_twenty_one_get_social_link_svg() – Detects the social network from a URL and returns the SVG code for its icon. */

/* function twenty_twenty_one_nav_menu_social_icons() – Displays SVG icons in the footer navigation. */

add_filter( 'walker_nav_menu_start_el', 'twenty_twenty_one_nav_menu_social_icons', 10, 4 );

/* function twenty_twenty_one_add_menu_description_args() – Filters the arguments for a single nav menu item. */
add_filter( 'nav_menu_item_args', 'twenty_twenty_one_add_menu_description_args', 10, 3 );
 

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      Call hooks

      File name: inc/menu-functions.php
      Plugin ref: Twenty Twenty-One
      Version: 1.7
      Deprecated?: No
      API Letters: F,I,M,P

      Published: 9th December 2020 | Last updated: 26th January 2022

      Primary Sidebar

      Information

      File name: inc/menu-functions.php
      Plugin ref: Twenty Twenty-One
      Version: 1.7
      Deprecated?: No
      API Letters: F,I,M,P

      inc

      Footer

      WordPress a2z
      WordPress a2z
      WordPress Dynamic API Reference
      WordPress 6.1.1. PHP: 8.0.28
      WordPress a2z
      WordPress core a2z
      Genesis Theme Framework a2z
      Jetpack a2z
      WordPress develop tests
      Easy Digital Downloads a2z
      WooCommerce a2z
      Yoast SEO a2z
      WordPress Blocks

      Site:  wp-a2z.org
      © Copyright WordPress a2z 2014-2023. All rights reserved.


      Website designed and developed by Herb Miller
      Proudly powered by WordPress and oik plugins

      • Home
      • Blog
      • Sitemap
      • Sites