display_comment_metadata( object $comment, array $args )
Outputs comment metadata
Parameters
- $comment
-
(Required) Current comment information.
- $args
-
(Required) An array of arguments.
Source
File: wp-includes/comment-template.php
function display_comment_metadata( $comment, $args ) {
if ( current_theme_supports( 'html5' ) ) {
printf(
'<a href="%s"><time datetime="%s">%s</time></a>',
esc_url( get_comment_link( $comment, $args ) ),
get_comment_time( 'c' ),
sprintf(
/* translators: 1: Comment date, 2: Comment time. */
__( '%1$s at %2$s' ),
get_comment_date( '', $comment ),
get_comment_time()
)
);
edit_comment_link( __( 'Edit' ), ' <span class="edit-link">', '</span>' );
} else {
printf(
'<a href="%s">%s</a>',
esc_url( get_comment_link( $comment, $args ) ),
sprintf(
/* translators: 1: Comment date, 2: Comment time. */
__( '%1$s at %2$s' ),
get_comment_date( '', $comment ),
get_comment_time()
)
);
edit_comment_link( __( '(Edit)' ), ' ', '' );
}
}