WordPress at a glance
function is not described

wc_get_page_children() WC 1.0

Recursively get page children.

No Hooks.

Return

Int[]. Nothing.

Usage

wc_get_page_children( $page_id );
$page_id(int) (required)
Page ID.

Code of wc_get_page_children() WC 5.2.2

<?php
function wc_get_page_children( $page_id ) {
	$page_ids = get_posts(
		array(
			'post_parent' => $page_id,
			'post_type'   => 'page',
			'numberposts' => -1, // @codingStandardsIgnoreLine
			'post_status' => 'any',
			'fields'      => 'ids',
		)
	);

	if ( ! empty( $page_ids ) ) {
		foreach ( $page_ids as $page_id ) {
			$page_ids = array_merge( $page_ids, wc_get_page_children( $page_id ) );
		}
	}

	return $page_ids;
}