Displays the comment time of the current comment.
Parameters
$format
stringoptional- PHP time format. Defaults to the
'time_format'
option.Default:
''
$comment_id
int|WP_Commentoptional- WP_Comment or ID of the comment for which to print the time.
Default current comment.
Source
function comment_time( $format = '', $comment_id = 0 ) {
echo get_comment_time( $format, false, true, $comment_id );
}
Basic Example
Displays the current comment time in the format “22:04:11”.