Make WordPress Core


Ignore:
Timestamp:
06/20/2020 11:20:25 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Synchronize and correct the documentation for wp_nav_menu() arguments in bundled themes.

See #49572.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/inc/template-tags.php

    r48102 r48103  
    500500 * styling of sub levels in the fallback. Only applied if the match_menu_classes argument is set.
    501501 *
    502  * @param array  $css_class CSS Class names.
    503  * @param string $item Comment.
    504  * @param int    $depth Depth of the current comment.
    505  * @param array  $args An array of arguments.
    506  * @param string $current_page Whether or not the item is the current item.
    507  * @return array $css_class CSS Class names.
    508  */
    509 function twentytwenty_filter_wp_list_pages_item_classes( $css_class, $item, $depth, $args, $current_page ) {
     502 * @param string[] $css_class    An array of CSS classes to be applied to each list item.
     503 * @param WP_Post  $page         Page data object.
     504 * @param int      $depth        Depth of page, used for padding.
     505 * @param array    $args        An array of arguments.
     506 * @param int      $current_page ID of the current page.
     507 * @return array CSS class names.
     508 */
     509function twentytwenty_filter_wp_list_pages_item_classes( $css_class, $page, $depth, $args, $current_page ) {
    510510
    511511    // Only apply to wp_list_pages() calls with match_menu_classes set to true.
     
    535535 * Adds a Sub Nav Toggle to the Expanded Menu and Mobile Menu.
    536536 *
    537  * @param stdClass $args An array of arguments.
    538  * @param string   $item Menu item.
    539  * @param int      $depth Depth of the current menu item.
    540  * @return stdClass $args An object of wp_nav_menu() arguments.
     537 * @param stdClass $args  An object of wp_nav_menu() arguments.
     538 * @param WP_Post  $item  Menu item data object.
     539 * @param int      $depth Depth of menu item. Used for padding.
     540 * @return stdClass An object of wp_nav_menu() arguments.
    541541 */
    542542function twentytwenty_add_sub_toggles_to_main_menu( $args, $item, $depth ) {
     
    581581 * Displays SVG icons in social links menu.
    582582 *
    583  * @param  string  $item_output The menu item output.
    584  * @param  WP_Post $item        Menu item object.
    585  * @param  int     $depth       Depth of the menu.
    586  * @param  array   $args        wp_nav_menu() arguments.
    587  * @return string  $item_output The menu item output with social icon.
     583 * @param string   $item_output The menu item's starting HTML output.
     584 * @param WP_Post  $item        Menu item data object.
     585 * @param int      $depth       Depth of the menu. Used for padding.
     586 * @param stdClass $args        An object of wp_nav_menu() arguments.
     587 * @return string The menu item output with social icon.
    588588 */
    589589function twentytwenty_nav_menu_social_icons( $item_output, $item, $depth, $args ) {
Note: See TracChangeset for help on using the changeset viewer.