[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

Comment API: Walker_Comment class

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

Defines 1 class

Walker_Comment:: (9 methods):
  start_lvl()
  end_lvl()
  display_element()
  start_el()
  end_el()
  ping()
  filter_comment_text()
  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.

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'.

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.

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

param: string     $output            Used to append additional content. Passed by reference.
param: WP_Comment $data_object       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        $current_object_id Optional. ID of the current comment. Default 0.

end_el( &$output, $data_object, $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 $data_object Comment data object.
param: int        $depth       Optional. Depth of the current comment. Default 0.
param: array      $args        Optional. An array of arguments. Default empty array.

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.

filter_comment_text( $comment_text, $comment )   X-Ref
Filters the comment text.

Removes links from the pending comment's text if the commenter did not consent
to the comment cookies.

return: string Filtered text of the current comment.
param: string          $comment_text Text of the current comment.
param: WP_Comment|null $comment      The comment object. Null if not found.

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.

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.



Generated : Sat Dec 21 08:20:01 2024 Cross-referenced by PHPXref