Un motore di ricerca WordPress per sviluppatori e autori di temi



walk_page_tree ›

Da2.1.0
Deprecaton/a
walk_page_tree ( $pages, $depth, $current_page, $r )
Parametri: (4)
  • (array) $pages
    Richiesto:
  • (int) $depth
    Richiesto:
  • (int) $current_page
    Richiesto:
  • (array) $r
    Richiesto:
Usi:
  • Walker_Page
Ritorna:
  • (string)
Definito a:
Codex:

Retrieve HTML list content for page list.



Sorgenti

function walk_page_tree( $pages, $depth, $current_page, $r ) {
	if ( empty( $r['walker'] ) ) {
		$walker = new Walker_Page;
	} else {
		$walker = $r['walker'];
	}

	foreach ( (array) $pages as $page ) {
		if ( $page->post_parent ) {
			$r['pages_with_children'][ $page->post_parent ] = true;
		}
	}

	$args = array( $pages, $depth, $r, $current_page );
	return call_user_func_array( array( $walker, 'walk' ), $args );
}