i use slim with wordpress. This worked flawlessly so far. Well almost. Once I changed to multisite I had to start fake creating
$_SERVER variables faking a domain name. But it worked finally.
What I had to use was this:
global $_SERVER; $_SERVER['HTTP_HOST'] = 'www.mydomain.com'; $_SERVER['REQUEST_URI'] = '/'; require_once( __DIR__ .'/../../../wp-load.php' );
it feels wrong and very clumsy, but not using it would lead to an error see here (or does this count as crosspost too?):
But now i ran into the following problem:
now is it somehow possible to get access to all wordpress functions without using wp-load.php?
the problem i am facing is that wp-load.php somehow alters the response object so that I am no longer able to flush to it (see link note: i think i found a solution to the problem. My question still remains: is there a more correct way to the wordpress functions instead of