[wp-testers] Can we delete this code from classes.php?
Ryan Boren
ryan at boren.nu
Wed Feb 1 22:58:57 GMT 2006
Aylwin Cal wrote:
> Hi,
>
> I've tried changing line 31 from:
> require('./wp-blog-header.php');
> to:
> include('./wp-config.php');
>
> I no longer get stuck with the 200 but I get the following error on every
> single Gallery page:
>
> Warning: extract(): First argument should be an array in
> /var/hometemp/aylwin/public_html/wp2/wp-includes/functions.php on line 2109
That's in load_template(), which should never be called when only
loading wp-config.php. Curious.
If you look at the wp() call in functions.php, you'll see that it calls
WP::main() in classes.php. main() does the basic init for a WP session.
You can call any of those functions individually, leaving out ones
such as handle_404() that you don't want to run. You can try this:
require('./wp-config.php');
$wp->init();
$wp-parse_request();
$wp->send_headers();
$wp->query_posts();
//Skip built-in 404 and do your own thing.
// $wp->handle_404();
custom_404_handler();
$wp->register_globals();
Of course, fixin WP in a way that accomodates everyone would be
preferable. I didn't do the suggested change for 2.0.1 simply because I
was afraid it would break other setups. We can nail this down for the
next release.
Ryan
More information about the wp-testers
mailing list