Class Walker_Comment

Description

HTML comment list class.

Located in /wp-includes/comment-template.php (line 1218)

Walker
   |
   --Walker_Comment
Variable Summary
array $db_fields
string $tree_type
Method Summary
void display_element ( $element,  &$children_elements,  $max_depth, [ $depth = 0],  $args,  &$output)
void end_el ( &$output, object $comment, [int $depth = 0], [array $args = array()], string $output)
void end_lvl ( &$output, [int $depth = 0], [array $args = array()], string $output)
void start_el ( &$output, object $comment, int $depth, array $args, [ $id = 0], string $output)
void start_lvl ( &$output, [int $depth = 0], [array $args = array()], string $output)
Variables
array $db_fields = array ('parent' => 'comment_parent', 'id' => 'comment_ID') (line 1231)

Redefinition of:
Walker::$db_fields
DB fields to use.
string $tree_type = 'comment' (line 1224)

Redefinition of:
Walker::$tree_type
What the class handles.

Inherited Variables

Inherited from Walker

Walker::$max_pages
Methods
display_element (line 1299)

This function is designed to enhance Walker::display_element() to display children of higher nesting levels than selected inline on the highest depth level displayed. This prevents them being orphaned at the end of the comment list.

Example: max_depth = 2, with 5 levels of nested content. 1 1.1 1.1.1 1.1.1.1 1.1.1.1.1 1.1.2 1.1.2.1 2 2.2

void display_element ( $element,  &$children_elements,  $max_depth, [ $depth = 0],  $args,  &$output)
  • $element
  • &$children_elements
  • $max_depth
  • $depth
  • $args
  • &$output

Redefinition of:
Walker::display_element()
Traverse elements to create list from elements.
end_el (line 1389)
void end_el ( &$output, object $comment, [int $depth = 0], [array $args = array()], string $output)
  • string $output: Passed by reference. Used to append additional content.
  • object $comment
  • int $depth: Depth of comment.
  • array $args
  • &$output

Redefinition of:
Walker::end_el()
Ends the element output, if needed.
end_lvl (line 1265)
void end_lvl ( &$output, [int $depth = 0], [array $args = array()], string $output)
  • string $output: Passed by reference. Used to append additional content.
  • int $depth: Depth of comment.
  • array $args: Will only append content if style argument value is 'ol' or 'ul'.
  • &$output

Redefinition of:
Walker::end_lvl()
Ends the list of after the elements are added.
start_el (line 1329)
void start_el ( &$output, object $comment, int $depth, array $args, [ $id = 0], string $output)
  • string $output: Passed by reference. Used to append additional content.
  • object $comment: Comment data object.
  • int $depth: Depth of comment in reference to parents.
  • array $args
  • &$output
  • $id

Redefinition of:
Walker::start_el()
Start the element output.
start_lvl (line 1241)
void start_lvl ( &$output, [int $depth = 0], [array $args = array()], string $output)
  • string $output: Passed by reference. Used to append additional content.
  • int $depth: Depth of comment.
  • array $args: Uses 'style' argument for type of HTML list.
  • &$output

Redefinition of:
Walker::start_lvl()
Starts the list before the elements are added.

Inherited Methods

Inherited From Walker

Walker::display_element()
Walker::end_el()
Walker::end_lvl()
Walker::get_number_of_root_elements()
Walker::paged_walk()
Walker::start_el()
Walker::start_lvl()
Walker::unset_children()
Walker::walk()

Documentation generated on Tue, 15 May 2012 23:18:00 +0000 by phpDocumentor 1.4.1