get_comment_time filter-hookWP 1.5.0

Filters the returned comment time.

Usage

add_filter( 'get_comment_time', 'wp_kama_get_comment_time_filter', 10, 5 );

/**
 * Function for `get_comment_time` filter-hook.
 * 
 * @param string|int $date      The comment time, formatted as a date string or Unix timestamp.
 * @param string     $format    PHP date format.
 * @param bool       $gmt       Whether the GMT date is in use.
 * @param bool       $translate Whether the time is translated.
 * @param WP_Comment $comment   The comment object.
 *
 * @return string|int
 */
function wp_kama_get_comment_time_filter( $date, $format, $gmt, $translate, $comment ){

	// filter...
	return $date;
}
$date(string|int)
The comment time, formatted as a date string or Unix timestamp.
$format(string)
PHP date format.
$gmt(true|false)
Whether the GMT date is in use.
$translate(true|false)
Whether the time is translated.
$comment(WP_Comment)
The comment object.

Changelog

Since 1.5.0 Introduced.

Where the hook is called

get_comment_time()
get_comment_time
wp-includes/comment-template.php 1060
return apply_filters( 'get_comment_time', $date, $format, $gmt, $translate, $comment );

Where the hook is used in WordPress

Usage not found.