Summery Summery

Traverses elements to create list from elements.

Syntax Syntax

Walker_Comment::display_element( WP_Comment $element, array $children_elements, int $max_depth, int $depth, array $args, string $output )

Description Description

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.2 2 2.2

Parameters Parameters


(WP_Comment) (Required) Comment data object.


(array) (Required) List of elements to continue traversing. Passed by reference.


(int) (Required) Max depth to traverse.


(int) (Required) Depth of the current element.


(array) (Required) An array of arguments.


(string) (Required) Used to append additional content. Passed by reference.

Source Source

File: wp-includes/class-walker-comment.php



Changelog Changelog

Version Description
2.7.0 Introduced.

See also See also


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.