[wp-trac] [WordPress Trac] #19849: Pass $comment_date to get_comment_time filter
WordPress Trac
wp-trac at lists.automattic.com
Tue Jan 17 17:50:51 UTC 2012
#19849: Pass $comment_date to get_comment_time filter
-------------------------+-----------------------------
Reporter: lexhair | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Date/Time | Version: 3.3.1
Severity: minor | Keywords:
-------------------------+-----------------------------
I was writing a function to customize the formatted time to include the
timezone in the comment meta data using the get_comment_time filter. In
order for me to properly indicate whether daylight savings time was in
effect at the time of the comment, I needed to globalize $comment to get
the comment_time property. The filter passed the $date variable which is
the formatted time part of the timestamp but not the $comment_date
variable which contained the entire timestamp from $comment. In the
function I developed, the $date string wasn't used at all. I returned the
formatted time string from $comment->comment_date directly.
Since get_comment_time() already establishes $comment_date, why not pass
it to the filter as well?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19849>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list