[wp-hackers] Any way to bypass $wp->query_posts()?
SoJ Web
sojweb at indiana.edu
Sat Apr 11 13:54:01 GMT 2009
There's been discussion on trac about this off and on, I see this
ticket that is relatively new:
http://core.trac.wordpress.org/ticket/9444
I know of at least one way, but it's really roundabout, and a bit of a
pain. If you create a file called .maintenance at the root of the Web
site that just has this:
<?php
$upgrading = time();
?>
And then create a file called maintenance.php in your wp-content
directory, WordPress (2.7.1, at least) will load wp-config.php, and
start to load wp-settings.php, but will exit out after only a few
constants are defined. But it loads maintenance.php before it dies, so
you could use maintenance.php to do whatever processing you might need
with the config constants.
I agree, though, you should be able to load the config information
without loading WordPress, and it seems like it's on its way.
-Jeff
On Apr 11, 2009, at 12:03 AM, Silverstein, Jesse wrote:
> On a lighter note along this subject ...
>
> Any chance of being able to extract the database constants from wp-
> config without loading wp-settings? There are plenty of obvious
> reasons a plugin would need to access the same database, and not
> load all of WordPress (as many core developers have adamantly
> asserted in this chain). Or should I resort to reading in the file
> line by line and parsing out the information I want?
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list