Uses
Uses | Description |
---|---|
wp-includes/class-wp-walker.php: Walker::walk() | Display array of elements hierarchically. |
Retrieve HTML list content for page list.
(array) (Required)
(int) (Required)
(int) (Required)
(array) (Required)
(string)
File: wp-includes/post-template.php
function walk_page_tree( $pages, $depth, $current_page, $r ) { if ( empty( $r['walker'] ) ) { $walker = new Walker_Page; } else { /** * @var Walker $walker */ $walker = $r['walker']; } foreach ( (array) $pages as $page ) { if ( $page->post_parent ) { $r['pages_with_children'][ $page->post_parent ] = true; } } return $walker->walk( $pages, $depth, $r, $current_page ); }
Version | Description |
---|---|
2.1.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/walk_page_tree