How does wordpress calculate the page depth?
Ok, lets break it down, all the links are going to be to the source code. wp_list_pages() only uses get_pages() to (sic!) get pages, walk_page_tree() does the hierarchical structuring inside it. The further course of the process goes Walker_Page – and the generic Walker of course -, unless a custom walker is used. Inside walk_page_tree() … Read more