[wp-trac] [WordPress Trac] #15063: Add a "context" property to WP_Query as a 2nd param to its constructor

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 11 21:38:11 UTC 2010


#15063: Add a "context" property to  WP_Query as a 2nd param to its constructor
--------------------------+-------------------------------------------------
 Reporter:  mikeschinkel  |        Owner:         
     Type:  enhancement   |       Status:  closed 
 Priority:  normal        |    Milestone:         
Component:  Post Types    |      Version:         
 Severity:  normal        |   Resolution:  wontfix
 Keywords:                |  
--------------------------+-------------------------------------------------
Changes (by scribu):

  * milestone:  Awaiting Review =>


Comment:

 So, since you won't be able to assign meaningful contexts automatically
 anyway, might as well encourage plugin authors to do:

 `get_posts( array( 'post_type' => .... 'context' =>
 'my_plugin_get_those_things' ) );`

 You could then do:

 `$context = $wp_query->get('context');`

 etc.

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


More information about the wp-trac mailing list