[wp-trac] [WordPress Trac] #15883: when using get_posts() post_date does not get localized

WordPress Trac wp-trac at lists.automattic.com
Sun Dec 19 07:12:12 UTC 2010


#15883: when using get_posts() post_date does not get localized
--------------------------+----------------------
 Reporter:  bmb           |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:  3.0.3
 Severity:  minor         |  Resolution:  invalid
 Keywords:                |
--------------------------+----------------------

Comment (by bmb):

 Replying to [comment:2 scribu]:
 > Filters are applied only when you call template tags, like the_title(),
 the_date() etc.
 >
 > So, the problem isn't that you're using get_posts(), but that you're
 accessing the post_date property directly instead of via get_the_date().

 when using get_posts, I can't use get_the_date, since it doesn't set the
 global $post, but I had understood that this was the correct simple method
 for getting posts, not using WP_query and loops.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15883#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list