显示当前评论的评论日期。
原型
comment_date( string $d = '', int|WP_Comment $comment_ID )
参数
$d
(string)
(Optional)
日期的格式。默认用户的设置。
$comment_ID
(int|WP_Comment)
(Optional)
WP_Comment或要为其打印日期的注释的ID。默认当前评论。
源文件
路径:wp-includes/comment-template.php
<?php
...
function comment_date( $d = '', $comment_ID = 0 ) {
echo get_comment_date( $d, $comment_ID );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/comment_date/