WordPress at Your Fingertips
function is not described

block_core_page_list_nest_pages() WP 1.0

Outputs nested array of pages

No Hooks.

Return

Array. The nested array of pages.

Usage

block_core_page_list_nest_pages( $current_level, $children );
$current_level(array) (required)
The level being iterated through.
$children(array) (required)
The children grouped by parent post ID.

Code of block_core_page_list_nest_pages() WP 5.8.2

function block_core_page_list_nest_pages( $current_level, $children ) {
	if ( empty( $current_level ) ) {
		return;
	}
	foreach ( (array) $current_level as $key => $current ) {
		if ( isset( $children[ $key ] ) ) {
			$current_level[ $key ]['children'] = block_core_page_list_nest_pages( $children[ $key ], $children );
		}
	}
	return $current_level;
}