Walker_Comment::end_el( string $output, WP_Comment $comment, int $depth, array $args = array() )

Ends the element output, if needed.

Description Description

See also See also

Top ↑

Parameters Parameters


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


(WP_Comment) (Required) The current comment object. Default current comment.


(int) (Optional) Depth of the current comment. Default 0.


(array) (Optional) An array of arguments.

Default value: array()

Top ↑

Source Source

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

	public function end_el( &$output, $comment, $depth = 0, $args = array() ) {
		if ( ! empty( $args['end-callback'] ) ) {
			call_user_func( $args['end-callback'], $comment, $args, $depth );
			$output .= ob_get_clean();
		if ( 'div' === $args['style'] ) {
			$output .= "</div><!-- #comment-## -->\n";
		} else {
			$output .= "</li><!-- #comment-## -->\n";

Top ↑

Changelog Changelog

Version Description
2.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.