[wp-hackers] Any way to bypass $wp->query_posts()?

Stephen Rider wp-hackers at striderweb.com
Mon Apr 6 04:10:01 GMT 2009


On Apr 5, 2009, at 10:52 PM, Mike Schinkel wrote:

>> You could also use one of the hooks inside query_posts, to override  
>> parts of the query, such as the where section,

> Yeah, i guess I could do "WHERE 1=0" but it still sends the query to  
> MySQL which is suboptimal.
>
>>> and I think even the whole query.
>
> AFAICT there's no way to bypass the query in that function. I've  
> poured over that section of code for several hours now. Hoping that  
> adding something to allow bypassing would be considered reasonable  
> by those who options are most respected here.

Yeah, it makes sense that if the filtered query == FALSE or something,  
that could mean "don't run the query".

Stephen


-- 
Stephen Rider
http://striderweb.com/






More information about the wp-hackers mailing list