mirror of
git://develop.git.wordpress.org/
synced 2025-04-07 21:53:21 +02:00
Coding Standards: Rename $r
variable to $args
for clarity in walk_page_tree()
.
Follow-up to [9830], [32617], [45667], [52684]. See #54728. git-svn-id: https://develop.svn.wordpress.org/trunk@52685 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
620b7ecf3d
commit
da774e124b
@ -1521,26 +1521,26 @@ function wp_page_menu( $args = array() ) {
|
||||
* @param array $pages
|
||||
* @param int $depth
|
||||
* @param int $current_page
|
||||
* @param array $r
|
||||
* @param array $args
|
||||
* @return string
|
||||
*/
|
||||
function walk_page_tree( $pages, $depth, $current_page, $r ) {
|
||||
if ( empty( $r['walker'] ) ) {
|
||||
function walk_page_tree( $pages, $depth, $current_page, $args ) {
|
||||
if ( empty( $args['walker'] ) ) {
|
||||
$walker = new Walker_Page;
|
||||
} else {
|
||||
/**
|
||||
* @var Walker $walker
|
||||
*/
|
||||
$walker = $r['walker'];
|
||||
$walker = $args['walker'];
|
||||
}
|
||||
|
||||
foreach ( (array) $pages as $page ) {
|
||||
if ( $page->post_parent ) {
|
||||
$r['pages_with_children'][ $page->post_parent ] = true;
|
||||
$args['pages_with_children'][ $page->post_parent ] = true;
|
||||
}
|
||||
}
|
||||
|
||||
return $walker->walk( $pages, $depth, $r, $current_page );
|
||||
return $walker->walk( $pages, $depth, $args, $current_page );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user