comment_date()

显示当前评论的信息

描述

显示发布评论的日期。

使用 get_comment_date() 检索值。

用法

<?php comment_date( $d, $comment_ID ); ?> 

参数

$d

(string) (可选)日期的格式。

默认值:WordPress中设置的日期格式。请参阅设置日期和时间格式。

$comment_ID  $comment_ID

(integer) (可选) 要为其打印日期的注释的 ID。

默认值: 0 (当前评论)

返回值

没有。呼应 get_comment_date() 的返回

源文件

comment_date() 函数的代码位于 wp-includes/comment-template.php

/* ———————————-
* wordpress函数 星空站长网 收集
* ———————————- */
/**
* 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 );

}
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索