[wp-trac] [WordPress Trac] #19515: Helper functions for accessing 'tax_query', 'query', 'meta_query' WP Query properties
WordPress Trac
wp-trac at lists.automattic.com
Mon Dec 12 20:29:11 UTC 2011
#19515: Helper functions for accessing 'tax_query', 'query', 'meta_query' WP Query
properties
-------------------------+-------------------------
Reporter: ejdanderson | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Query | Version: 3.1
Severity: minor | Resolution: worksforme
Keywords: needs-patch |
-------------------------+-------------------------
Comment (by ejdanderson):
Replying to [comment:2 scribu]:
> The tax_query property is accessible from any WP_Query instance:
>
> {{{
> $my_query = new WP_Query( array(
> 'tax_query' => array(
> ...
> )
> ) );
>
> var_dump( $my_query->tax_query );
> }}}
Yes, but we could also do that with the get_queried_object. get_query_var,
have_comments etc.. methods, which are just wrappers for the global
$wp_query object methods. Is it because these are properties and not
methods?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19515#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list