[wp-trac] [WordPress Trac] #12267: Upgrade loop objects to provide identical presentational interfaces.

WordPress Trac wp-trac at lists.automattic.com
Tue Feb 23 02:15:15 UTC 2010


#12267: Upgrade loop objects to provide identical presentational interfaces.
-------------------------+--------------------------------------------------
 Reporter:  andy         |       Owner:     
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.0
Component:  General      |     Version:     
 Severity:  normal       |    Keywords:     
-------------------------+--------------------------------------------------

Comment(by filosofo):

 Replying to [comment:18 prettyboymp]:
 > This also allows a filter to eventually be added to get_property().

 Why would we need to have a separate, private property to have a filter?

 > I also don't know if WP_Page should be a separate class.  Especially
 with the addition of custom post_types.  Its data is so similar to posts
 and different enough from other presentable data, that being able see that
 is of type WP_Post and being able to get the post_type from it should be
 enough.

 Well for one thing it's consistent: in each case the name of the class
 reflects the kind of object it is.

 More importantly, either this interface or a decorator will do things like
 set the permalink, which is determined differently between pages and
 posts.

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


More information about the wp-trac mailing list