On this page
Walker_Comment::end_el( string $output, WP_Comment $data_object, int $depth, array $args = array() )
Ends the element output, if needed.
Description
See also
Parameters
$outputstring Required-
Used to append additional content. Passed by reference.
$data_objectWP_Comment Required-
Comment data object.
$depthint Optional-
Depth of the current comment. Default 0.
$argsarray Optional-
An array of arguments.
Default:
array()
Source
File: wp-includes/class-walker-comment.php. View all references
public function end_el( &$output, $data_object, $depth = 0, $args = array() ) {
if ( ! empty( $args['end-callback'] ) ) {
ob_start();
call_user_func(
$args['end-callback'],
$data_object, // The current comment object.
$args,
$depth
);
$output .= ob_get_clean();
return;
}
if ( 'div' === $args['style'] ) {
$output .= "</div><!-- #comment-## -->\n";
} else {
$output .= "</li><!-- #comment-## -->\n";
}
}
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/walker_comment/end_el