Uses
Uses | Description |
---|---|
wp-includes/post.php: _page_traverse_name() | Traverse and return all the nested children post names of a root page. |
This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness. Use _page_traverse_name() instead.
Traverse and return all the nested children post names of a root page.
$children contains parent-children relations
(int) (Required) Page ID.
(array) (Required) Parent-children relations (passed by reference).
(string[]) (Required) Array of page names keyed by ID (passed by reference).
File: wp-includes/post.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 ); } } }
Version | Description |
---|---|
2.9.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/_page_traverse_name