WPDev.one
Core Function
View Source on Trac ↗

get_comment_time()

get_comment_time( mixed $format = '', mixed $gmt = false, mixed $translate = true, mixed $comment_id = 0 )

Retrieves the comment time of the current comment.

Parameters 2 required

Name / Type Description
$format
string

Optional. PHP date format. Defaults to the 'time_format' option.

$gmt
bool

Optional. Whether to use the GMT date. Default false.

bool

$translate Optional. Whether to translate the time (for use in feeds). Default true.

Required
mixed

(int | WP_Comment) $comment_id Optional. WP_Comment or ID of the comment for which to get the time. Default current comment.

Required

Return Value

(string)
The formatted time.

Function Information

Since Version
1.5.0
Source File
wp-includes/comment-template.php
Advertisement