WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #14600


Ignore:
Timestamp:
08/12/10 12:55:11 (5 years ago)
Author:
scribu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14600 – Description

    initial v1  
    11Currently, if you do this: 
    22 
    3 {{{$query = new WP_Query( array('tag' => 'foobar', 'year' => 2010 ) );}}} 
     3{{{ 
     4$query = new WP_Query( array( 'tag' => 'foobar', 'year' => 2010 ) ); 
     5}}} 
    46 
    5 $query->query will be array('tag' => 'foobar', 'year' => 2010 ). 
     7$query->query will be {{{array( 'tag' => 'foobar', 'year' => 2010 )}}}. 
    68 
    79If you do 
    810 
    9 {{{$query = new WP_Query('tag=foobar&year=2010');}}} 
     11{{{ 
     12$query = new WP_Query('tag=foobar&year=2010'); 
     13}}} 
    1014 
    11 $query->query will be 'tag=foobar&year=2010'. 
     15$query->query will be {{{tag=foobar&year=2010}}}. 
    1216 
    1317I think it would be more useful if $query->query will be an array in both cases. Currently, if you want to check that variable from a filter, you always have to call wp_parse_args() yourself: