On this page
Walker_Comment::ping( WP_Comment $comment, int $depth, array $args )
Outputs a pingback comment.
Description
See also
Parameters
$commentWP_Comment Required-
The comment object.
$depthint Required-
Depth of the current comment.
$argsarray Required-
An array of arguments.
Source
File: wp-includes/class-walker-comment.php. View all references
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
}
Related
Uses
| Uses | Description |
|---|---|
| edit_comment_link() wp-includes/link-template.php | Displays the edit comment link with formatting. |
| comment_ID() wp-includes/comment-template.php | Displays the comment ID of the current comment. |
| comment_class() wp-includes/comment-template.php | Generates semantic classes for each comment element. |
| comment_author_link() wp-includes/comment-template.php | Displays the HTML link to the URL of the author of the current comment. |
| _e() wp-includes/l10n.php | Displays translated text. |
| __() wp-includes/l10n.php | Retrieves the translation of $text. |
Used By
| Used By | Description |
|---|---|
| Walker_Comment::start_el() wp-includes/class-walker-comment.php | Starts the element output. |
Changelog
| Version | Description |
|---|---|
| 3.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/walker_comment/ping