[wp-hackers] Avoiding the main query when loading WP from another script

Ryan McCue lists at rotorised.com
Sun Dec 9 12:30:56 UTC 2012


Otto wrote:
> Err... Just include wp-load.php?
> 
> The query doesn't run until the wp() function is called, and that
> happens in wp-blog-header.php, not in wp-load.php. So, just including
> wp-load.php doesn't run the main query. Or parse the query vars, or
> much of anything else.

Heh, yeah, I screwed up while reading the code and got confused. There
are a few things done in wp-load.php that don't make sense if WP is
embedded inside another application (e.g. magic quote adding).

-- 
Ryan McCue
<http://ryanmccue.info/>


More information about the wp-hackers mailing list