WordPress at a glance
function is not described

_page_traverse_name() WP 2.9.0

Traverse and return all the nested children post names of a root page.

$children contains parent-children relations

  • See: _page_traverse_name()

No Hooks.


Nothing (null).


_page_traverse_name( $page_id, &$children, &$result );
$page_id(int) (required)
Page ID.
$children(array) (required)
Parent-children relations (passed by reference).
$result(array) (required)
Result (passed by reference).

Code of page traverse name: wp-includes/post.php VER 5.1.1

function _page_traverse_name( $page_id, &$children, &$result ) {
	if ( isset( $children[ $page_id ] ) ) {
		foreach ( (array) $children[ $page_id ] as $child ) {
			$result[ $child->ID ] = $child->post_name;
			_page_traverse_name( $child->ID, $children, $result );