X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/03f2fa83c13c1b532284205fa7efcab9b8b2c41f..607b7e02d77e7326161e8ec15639052d2040f745:/wp-includes/class-walker-page.php diff --git a/wp-includes/class-walker-page.php b/wp-includes/class-walker-page.php index 3b3ca318..fd55ccee 100644 --- a/wp-includes/class-walker-page.php +++ b/wp-includes/class-walker-page.php @@ -15,28 +15,42 @@ * @see Walker */ class Walker_Page extends Walker { + /** - * @see Walker::$tree_type + * What the class handles. + * * @since 2.1.0 + * @access public * @var string + * + * @see Walker::$tree_type */ public $tree_type = 'page'; /** - * @see Walker::$db_fields + * Database fields to use. + * * @since 2.1.0 - * @todo Decouple this. + * @access private * @var array + * + * @see Walker::$db_fields + * @todo Decouple this. */ - public $db_fields = array ('parent' => 'post_parent', 'id' => 'ID'); + public $db_fields = array( 'parent' => 'post_parent', 'id' => 'ID' ); /** - * @see Walker::start_lvl() + * Outputs the beginning of the current level in the tree before elements are output. + * * @since 2.1.0 + * @access public + * + * @see Walker::start_lvl() * * @param string $output Passed by reference. Used to append additional content. - * @param int $depth Depth of page. Used for padding. - * @param array $args + * @param int $depth Optional. Depth of page. Used for padding. Default 0. + * @param array $args Optional. Arguments for outputing the next level. + * Default empty array. */ public function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat("\t", $depth); @@ -44,12 +58,17 @@ class Walker_Page extends Walker { } /** - * @see Walker::end_lvl() + * Outputs the end of the current level in the tree after elements are output. + * * @since 2.1.0 + * @access public + * + * @see Walker::end_lvl() * * @param string $output Passed by reference. Used to append additional content. - * @param int $depth Depth of page. Used for padding. - * @param array $args + * @param int $depth Optional. Depth of page. Used for padding. Default 0. + * @param array $args Optional. Arguments for outputting the end of the current level. + * Default empty array. */ public function end_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat("\t", $depth); @@ -57,14 +76,17 @@ class Walker_Page extends Walker { } /** + * Outputs the beginning of the current element in the tree. + * * @see Walker::start_el() * @since 2.1.0 + * @access public * - * @param string $output Passed by reference. Used to append additional content. - * @param object $page Page data object. - * @param int $depth Depth of page. Used for padding. - * @param int $current_page Page ID. - * @param array $args + * @param string $output Used to append additional content. Passed by reference. + * @param WP_Post $page Page data object. + * @param int $depth Optional. Depth of page. Used for padding. Default 0. + * @param array $args Optional. Array of arguments. Default empty array. + * @param int $current_page Optional. Page ID. Default 0. */ public function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) { if ( $depth ) { @@ -94,14 +116,14 @@ class Walker_Page extends Walker { } /** - * Filter the list of CSS classes to include with each page item in the list. + * Filters the list of CSS classes to include with each page item in the list. * * @since 2.8.0 * * @see wp_list_pages() * * @param array $css_class An array of CSS classes to be applied - * to each list item. + * to each list item. * @param WP_Post $page Page data object. * @param int $depth Depth of page, used for padding. * @param array $args An array of arguments. @@ -117,12 +139,12 @@ class Walker_Page extends Walker { $args['link_before'] = empty( $args['link_before'] ) ? '' : $args['link_before']; $args['link_after'] = empty( $args['link_after'] ) ? '' : $args['link_after']; - /** This filter is documented in wp-includes/post-template.php */ $output .= $indent . sprintf( '
  • %s%s%s', $css_classes, get_permalink( $page->ID ), $args['link_before'], + /** This filter is documented in wp-includes/post-template.php */ apply_filters( 'the_title', $page->post_title, $page->ID ), $args['link_after'] ); @@ -140,13 +162,17 @@ class Walker_Page extends Walker { } /** - * @see Walker::end_el() + * Outputs the end of the current element in the tree. + * * @since 2.1.0 + * @access public * - * @param string $output Passed by reference. Used to append additional content. - * @param object $page Page data object. Not used. - * @param int $depth Depth of page. Not Used. - * @param array $args + * @see Walker::end_el() + * + * @param string $output Used to append additional content. Passed by reference. + * @param WP_Post $page Page data object. Not used. + * @param int $depth Optional. Depth of page. Default 0 (unused). + * @param array $args Optional. Array of arguments. Default empty array. */ public function end_el( &$output, $page, $depth = 0, $args = array() ) { $output .= "
  • \n";