Ends the element output, if needed.
$outputstringrequired
$data_objectWP_Commentrequired
$depthintoptional
$argsarrayoptional
Default:array()
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";
}
}
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/walker_comment/end_el