walk_page_tree( array $pages, int $depth, int $current_page, array $r )

Retrieve HTML list content for page list.


Description Description


Parameters Parameters

$pages

(array) (Required)

$depth

(int) (Required)

$current_page

(int) (Required)

$r

(array) (Required)


Top ↑

Return Return

(string)


Top ↑

Source Source

File: wp-includes/post-template.php

function walk_page_tree( $pages, $depth, $current_page, $r ) {
	if ( empty($r['walker']) )
		$walker = new Walker_Page;
	else
		$walker = $r['walker'];

	foreach ( (array) $pages as $page ) {
		if ( $page->post_parent )
			$r['pages_with_children'][ $page->post_parent ] = true;
	}

	$args = array($pages, $depth, $r, $current_page);
	return call_user_func_array(array($walker, 'walk'), $args);
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.1.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.