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
350                $page_tree[$page->post_parent]['children'][] = $page->ID;
351      }
352      // Output of the pages starting with child_of as the root ID.
353      // child_of defaults to 0 if not supplied in the query.
354      $output .= _page_level_out($r['child_of'],$page_tree, $r, 0, false);
355      if ( $r['title_li'] )
356           $output .= '</ul></li>';
357      endif;
358      
359      $output = apply_filters('wp_list_pages', $output);
360      
361      if ( $r['echo'] )
362           echo $output;
363      else 
364           return $output;
365 }
366
367 function _page_level_out($parent, $page_tree, $args, $depth = 0, $echo = true) {
368      global $wp_query;