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

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 31 17:02:08 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 ryan):

 Both WP_Post->filter and WP_Post->post->filter exist. I guess because of
 to_array().

 get_object_vars() will no longer return much if fed WP_Post. We use
 get_object_vars() in get_children(), sanitize_post(),
 wp_get_recent_posts(), wp_update_post(), _wp_put_post_revision(),
 wp_get_post_revision(), and elsewhere. I notice that several plugins
 including the bbPress plugin also do this.

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


More information about the wp-trac mailing list