get_comment_time

Definition:
function get_comment_time( $d = '', $gmt = false, $translate = true ) {}

Retrieve the comment time of the current comment.

Parameters

  • string $d: Optional. The format of the time (defaults to user’s config)
  • bool $gmt: Whether to use the GMT date
  • bool $translate: Whether to translate the time (for use in feeds)

Return values

returns:The formatted time

Defined filters

  • get_comment_time
    apply_filters('get_comment_time', $date, $d, $gmt, $translate)

Source code

function get_comment_time( $d = '', $gmt = false, $translate = true ) {

	global $comment;

	$comment_date = $gmt ? $comment->comment_date_gmt : $comment->comment_date;

	if ( '' == $d )

		$date = mysql2date(get_option('time_format'), $comment_date, $translate);

	else

		$date = mysql2date($d, $comment_date, $translate);

	return apply_filters('get_comment_time', $date, $d, $gmt, $translate);

}

1332

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: