comment_date()
comment_date( string $format = ”, int|WP_Comment $comment_ID )
显示当前批注的批注日期。
Displays the comment date of the current comment.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$format | (string) | 可选 | 日期的格式。默认用户设置。 |
$comment_ID | (int | WP_Comment) | 可选 | WP_注释或要打印日期的注释的ID。默认当前注释。 |
返回(Return)
无返回值
源码(Source)
/** * Display the comment date of the current comment. * * @since 0.71 * * @param string $d Optional. The format of the date. Default user's settings. * @param int $comment_ID ID of the comment for which to print the date. Default current comment. */ function comment_date( $d = '', $comment_ID = 0 ) { echo get_comment_date( $d, $comment_ID ); }
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.4.0 | wp-includes/comment-template.php:580 | 0 | 1 function |
笔记(Notes)
基本示例
comment_date() 为WP2原创文章,链接:https://www.wp2.cn/functions/comment_date/