[wp-trac] [WordPress Trac] #16854: wp_query does not handle multiple exclude author properly

WordPress Trac noreply at wordpress.org
Thu Aug 8 16:54:17 UTC 2013


#16854: wp_query does not handle multiple exclude author properly
---------------------------------+------------------
 Reporter:  commentluv           |       Owner:
     Type:  enhancement          |      Status:  new
 Priority:  normal               |   Milestone:  3.7
Component:  Query                |     Version:  3.1
 Severity:  normal               |  Resolution:
 Keywords:  has-patch 3.5-early  |
---------------------------------+------------------
Changes (by wonderboymusic):

 * milestone:  Future Release => 3.7


Comment:

 I really dig this. I rewrote parts of the patch and refreshed others
 against trunk.

 Allows vars like these:

 {{{
 get_posts( array( 'author' => '' ) );
 get_posts( array( 'author' => 0 ) );
 get_posts( array( 'author' => '0' ) );
 get_posts( array( 'author' => 1 ) );
 get_posts( array( 'author' => '1,2' ) );
 get_posts( array( 'author' => '-1,2' ) );
 get_posts( array( 'author' => '1,-2' ) );
 get_posts( array( 'author' => '-1,-2' ) );
 get_posts( array( 'author__in' => array( 1, 2 ) ) );
 get_posts( array( 'author__not_in' => array( 1, 2 ) ) );
 get_posts( array( 'author_name' => 'admin' ) );
 exit();
 }}}

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


More information about the wp-trac mailing list