Make WordPress Core

Changeset 52685


Ignore:
Timestamp:
02/07/2022 02:19:31 PM (2 years ago)
Author:
SergeyBiryukov
Message:

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

Follow-up to [9830], [32617], [45667], [52684].

See #54728.

File:
1 edited

Legend:

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

    r52204 r52685  
    15221522 * @param int   $depth
    15231523 * @param int   $current_page
    1524  * @param array $r
     1524 * @param array $args
    15251525 * @return string
    15261526 */
    1527 function walk_page_tree( $pages, $depth, $current_page, $r ) {
    1528     if ( empty( $r['walker'] ) ) {
     1527function walk_page_tree( $pages, $depth, $current_page, $args ) {
     1528    if ( empty( $args['walker'] ) ) {
    15291529        $walker = new Walker_Page;
    15301530    } else {
     
    15321532         * @var Walker $walker
    15331533         */
    1534         $walker = $r['walker'];
     1534        $walker = $args['walker'];
    15351535    }
    15361536
    15371537    foreach ( (array) $pages as $page ) {
    15381538        if ( $page->post_parent ) {
    1539             $r['pages_with_children'][ $page->post_parent ] = true;
    1540         }
    1541     }
    1542 
    1543     return $walker->walk( $pages, $depth, $r, $current_page );
     1539            $args['pages_with_children'][ $page->post_parent ] = true;
     1540        }
     1541    }
     1542
     1543    return $walker->walk( $pages, $depth, $args, $current_page );
    15441544}
    15451545
Note: See TracChangeset for help on using the changeset viewer.