[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:09:12 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:17 andy]:
 > The part of the class name that follows the object type should not be
 capitalized. WP_Object_Post should be WP_Object_post because "post" is
 actually data. The simplicity of taking data from post_type or
 comment_type for the class name without transforming to leading caps
 trumps the style guide. IMHO, anyway.

 PHP class names are case-insensitive, so we can check that "WP_Object_" .
 "post" is a defined class when it's actually named "WP_Object_Post."  The
 data function still works but it looks more consistent with WP practice.

 >
 > Also I think we might give wpdb::query() a new return type, WP_OBJECT,
 which would put all rows through the factory.

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


More information about the wp-trac mailing list