Walker_Comment::ping()protectedWP 3.6.0

Outputs a pingback comment.

Method of the class: Walker_Comment{}

No Hooks.

Return

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->ping( $comment, $depth, $args );
$comment(WP_Comment) (required)
The comment object.
$depth(int) (required)
Depth of the current comment.
$args(array) (required)
An array of arguments.

Notes

Changelog

Since 3.6.0 Introduced.

Walker_Comment::ping() code WP 6.5.2

<?php
protected function ping( $comment, $depth, $args ) {
	$tag = ( 'div' === $args['style'] ) ? 'div' : 'li';
	?>
	<<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( '', $comment ); ?>>
		<div class="comment-body">
			<?php _e( 'Pingback:' ); ?> <?php comment_author_link( $comment ); ?> <?php edit_comment_link( __( 'Edit' ), '<span class="edit-link">', '</span>' ); ?>
		</div>
	<?php
}