[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/ -> class-walker-comment.php (summary)

Comment API: Walker_Comment class

File Size: 421 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Walker_Comment:: (8 methods):
  start_lvl()
  end_lvl()
  display_element()
  start_el()
  end_el()
  ping()
  comment()
  html5_comment()


Class: Walker_Comment  - X-Ref

Core walker class used to create an HTML list of comments.

start_lvl( &$output, $depth = 0, $args = array()   X-Ref
Starts the list before the elements are added.

param: string $output Used to append additional content (passed by reference).
param: int    $depth  Optional. Depth of the current comment. Default 0.
param: array  $args   Optional. Uses 'style' argument for type of HTML list. Default empty array.
since: 2.7.0

end_lvl( &$output, $depth = 0, $args = array()   X-Ref
Ends the list of items after the elements are added.

param: string $output Used to append additional content (passed by reference).
param: int    $depth  Optional. Depth of the current comment. Default 0.
param: array  $args   Optional. Will only append content if style argument value is 'ol' or 'ul'.
since: 2.7.0

display_element( $element, &$children_elements, $max_depth, $depth, $args, &$output )   X-Ref
Traverses elements to create list from elements.

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

param: WP_Comment $element           Comment data object.
param: array      $children_elements List of elements to continue traversing. Passed by reference.
param: int        $max_depth         Max depth to traverse.
param: int        $depth             Depth of the current element.
param: array      $args              An array of arguments.
param: string     $output            Used to append additional content. Passed by reference.
since: 2.7.0

start_el( &$output, $comment, $depth = 0, $args = array()   X-Ref
Starts the element output.

param: string     $output  Used to append additional content. Passed by reference.
param: WP_Comment $comment Comment data object.
param: int        $depth   Optional. Depth of the current comment in reference to parents. Default 0.
param: array      $args    Optional. An array of arguments. Default empty array.
param: int        $id      Optional. ID of the current comment. Default 0 (unused).
since: 2.7.0

end_el( &$output, $comment, $depth = 0, $args = array()   X-Ref
Ends the element output, if needed.

param: string     $output  Used to append additional content. Passed by reference.
param: WP_Comment $comment The current comment object. Default current comment.
param: int        $depth   Optional. Depth of the current comment. Default 0.
param: array      $args    Optional. An array of arguments. Default empty array.
since: 2.7.0

ping( $comment, $depth, $args )   X-Ref
Outputs a pingback comment.

param: WP_Comment $comment The comment object.
param: int        $depth   Depth of the current comment.
param: array      $args    An array of arguments.
since: 3.6.0

comment( $comment, $depth, $args )   X-Ref
Outputs a single comment.

param: WP_Comment $comment Comment to display.
param: int        $depth   Depth of the current comment.
param: array      $args    An array of arguments.
since: 3.6.0

html5_comment( $comment, $depth, $args )   X-Ref
Outputs a comment in the HTML5 format.

param: WP_Comment $comment Comment to display.
param: int        $depth   Depth of the current comment.
param: array      $args    An array of arguments.
since: 3.6.0



Generated: Sat Sep 21 01:00:03 2019 Cross-referenced by PHPXref 0.7.1