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.

Return

Nothing (null).

Usage

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

Code of page traverse name: wp-includes/post.php WP 5.2.2

<?php
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 );
		}
	}
}