Skip to content

Commit

Permalink
Coding Standards: Rename $r variable to $args for clarity in `wal…
Browse files Browse the repository at this point in the history
…k_nav_menu_tree()`.

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

Props uzumymw.
See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52684 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Feb 7, 2022
1 parent 371966a commit 620b7ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wp-includes/nav-menu-template.php
Expand Up @@ -599,13 +599,13 @@ function _wp_menu_item_classes_by_context( &$menu_items ) {
*
* @param array $items The menu items, sorted by each menu item's menu order.
* @param int $depth Depth of the item in reference to parents.
* @param stdClass $r An object containing wp_nav_menu() arguments.
* @param stdClass $args An object containing wp_nav_menu() arguments.
* @return string The HTML list content for the menu items.
*/
function walk_nav_menu_tree( $items, $depth, $r ) {
$walker = ( empty( $r->walker ) ) ? new Walker_Nav_Menu : $r->walker;
function walk_nav_menu_tree( $items, $depth, $args ) {
$walker = ( empty( $args->walker ) ) ? new Walker_Nav_Menu : $args->walker;

return $walker->walk( $items, $depth, $r );
return $walker->walk( $items, $depth, $args );
}

/**
Expand Down

0 comments on commit 620b7ec

Please sign in to comment.