Make WordPress Core

Changeset 52684


Ignore:
Timestamp:
02/07/2022 01:59:19 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Rename $r variable to $args for clarity in walk_nav_menu_tree().

Follow-up to [14248], [32612], [45667].

Props uzumymw.
See #54728.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu-template.php

    r49927 r52684  
    600600 * @param array    $items The menu items, sorted by each menu item's menu order.
    601601 * @param int      $depth Depth of the item in reference to parents.
    602  * @param stdClass $r     An object containing wp_nav_menu() arguments.
     602 * @param stdClass $args  An object containing wp_nav_menu() arguments.
    603603 * @return string The HTML list content for the menu items.
    604604 */
    605 function walk_nav_menu_tree( $items, $depth, $r ) {
    606     $walker = ( empty( $r->walker ) ) ? new Walker_Nav_Menu : $r->walker;
    607 
    608     return $walker->walk( $items, $depth, $r );
     605function walk_nav_menu_tree( $items, $depth, $args ) {
     606    $walker = ( empty( $args->walker ) ) ? new Walker_Nav_Menu : $args->walker;
     607
     608    return $walker->walk( $items, $depth, $args );
    609609}
    610610
Note: See TracChangeset for help on using the changeset viewer.