[wp-hackers] parse_query filter

Mike Little mike at zed1.com
Wed Oct 5 21:05:41 GMT 2005

On 05/10/05, Owen Winkler <ringmaster at midnightcircus.com> wrote:
> I was looking for a plugin hook that would allow me to inject the
> query_vars with a value or two before the default posts array is
> generated.  That's when I came upon this:
> if ( !empty($query) ) {
>         do_action('parse_query', array(&$this));
> }
> Why does $query have to be empty to fire this hook?  There seems to be
> no other way to modify the query_vars on the home page from a plugin.
> Owen

Surely that says *not* empty. I.e only call the hook if there is a
query to process.

Mike Little

More information about the wp-hackers mailing list