Created
May 22, 2012 19:05
-
-
Save mikeemoo/2770986 to your computer and use it in GitHub Desktop.
Wordpress connection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Lowpress\WordpressBundle; | |
use Symfony\Component\HttpKernel\Bundle\Bundle; | |
class LowpressWordpressBundle extends Bundle | |
{ | |
public function boot() | |
{ | |
//... | |
define('WP_USE_THEMES', false); | |
require_once($docroot.'wp-load.php'); | |
foreach(get_defined_vars() as $key => $val) | |
$GLOBALS[$key] = $val; | |
parent::boot(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment