get_comment_date
Filters the returned comment date.
Usage
add_filter( 'get_comment_date', 'wp_kama_get_comment_date_filter', 10, 3 ); /** * Function for `get_comment_date` filter-hook. * * @param string|int $comment_date Formatted date string or Unix timestamp. * @param string $format PHP date format. * @param WP_Comment $comment The comment object. * * @return string|int */ function wp_kama_get_comment_date_filter( $comment_date, $format, $comment ){ // filter... return $comment_date; }
- $comment_date(string|int)
- Formatted date string or Unix timestamp.
- $format(string)
- PHP date format.
- $comment(WP_Comment)
- The comment object.
Changelog
Since 1.5.0 | Introduced. |
Where the hook is called
get_comment_date
wp-includes/comment-template.php 629
return apply_filters( 'get_comment_date', $comment_date, $format, $comment );