Commit 5ffab2a0 authored by Andrew Nacin's avatar Andrew Nacin
Browse files

Pass the comment object to the get_comment_date and get_comment_time.

props SergeyBiryukov.
fixes #19849.

Built from https://develop.svn.wordpress.org/trunk@27283


git-svn-id: https://core.svn.wordpress.org/trunk@27139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent a0fed728
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -474,8 +474,9 @@ function get_comment_date( $d = '', $comment_ID = 0 ) {
	 *
	 * @param string|int $date    Formatted date string or Unix timestamp.
	 * @param string     $d       The format of the date.
	 * @param object     $comment The comment object.
	 */
	return apply_filters( 'get_comment_date', $date, $d );
	return apply_filters( 'get_comment_date', $date, $d, $comment );
}

/**
@@ -820,8 +821,9 @@ function get_comment_time( $d = '', $gmt = false, $translate = true ) {
	 * @param string     $d         Date format.
	 * @param bool       $gmt       Whether the GMT date is in use.
	 * @param bool       $translate Whether the time is translated.
	 * @param object     $comment   The comment object.
	 */
	return apply_filters( 'get_comment_time', $date, $d, $gmt, $translate );
	return apply_filters( 'get_comment_time', $date, $d, $gmt, $translate, $comment );
}

/**