[wp-trac] [WordPress Trac] #21309: Introduce WP_Post class

WordPress Trac wp-trac at lists.automattic.com
Sat Sep 22 16:15:03 UTC 2012


#21309: Introduce WP_Post class
----------------------------+------------------
 Reporter:  scribu          |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  3.5
Component:  General         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------

Comment (by scribu):

 nacin, in IRC:

 > I noticed some issues in WP_Post's `__get()` while looking into this.

 > wp_get_post_tags(), wp_get_post_categories() are not cached. They call
 wp_get_object_terms() ultimately.

 > previously, someone would call wp_get_recent_posts() and those would
 each be called once and set against the object. now, it happens on every
 access.

 I'm investigating if we could move the caching from get_the_terms() into
 wp_get_object_terms() and fix things like #18968 in the process.

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


More information about the wp-trac mailing list