Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_list_pages

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
378                     $page_tree[$page->post_parent]['children'][] = $page->ID;
379           }
380           // Output of the pages starting with child_of as the root ID.
381           // child_of defaults to 0 if not supplied in the query.
382           $output .= _page_level_out($r['child_of'],$page_tree, $r, 0, false);
383           if ( $r['title_li'] )
384                $output .= '</ul></li>';
385      }
386
387      $output = apply_filters('wp_list_pages', $output);
388
389      if ( $r['echo'] )
390           echo $output;
391      else
392           return $output;
393 }
394
395
396 function _page_level_out($parent, $page_tree, $args, $depth = 0, $echo = true) {