[wp-trac] [WordPress Trac] #19866: Allow specifications of any wp_posts field(s) in WP_Query

WordPress Trac noreply at wordpress.org
Fri Aug 9 19:14:28 UTC 2013


#19866: Allow specifications of any wp_posts field(s) in WP_Query
-------------------------+------------------
 Reporter:  bigdawggi    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  3.7
Component:  Query        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------
Changes (by wonderboymusic):

 * keywords:   => has-patch
 * milestone:  Awaiting Review => 3.7


Comment:

 Yes, yes. With my patch, if you pass an array to `fields`, it will grab
 only those columns

 {{{
 $query = new WP_Query( array( 'fields' => array( 'post_parent', 'guid' ) )
 );
 print_r( $query->posts );
 exit();
 }}}

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


More information about the wp-trac mailing list