[wp-trac] [WordPress Trac] #14349: Filter to query_posts() args
WordPress Trac
wp-trac at lists.automattic.com
Mon Jul 19 19:41:32 UTC 2010
#14349: Filter to query_posts() args
-------------------------+--------------------------------------------------
Reporter: lucaswxp | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 3.0
Severity: normal | Keywords: query_posts, filter, hooks
-------------------------+--------------------------------------------------
Comment(by scribu):
Nice; I would love to have access to all the query bits in one callback.
I would even be happy with this:
{{{
function alter_query_bits( $sql_query, $query_vars ) {
if ( isset( $query_vars['my_custom_arg'] ) ) {
// do some stuff to $sql_query
}
return $sql_query;
}
add_filter( 'query_bits', 'alter_query_bits', 10, 2);
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14349#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list