Created
February 3, 2012 17:43
-
-
Save anonymous/1731344 to your computer and use it in GitHub Desktop.
Wordpress in Li3
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
public function load() | |
{ | |
global $PHP_SELF; | |
global $wp_embed; | |
global $wpdb; | |
$db = Connections::get('default', array('config'=>true)); | |
//set connection to inboundink database just so it has a valid connection for now | |
//when actually doing something, it will connect to the appropriate db | |
define('DB_HOST', $db['host'] ); | |
define('DB_NAME', $db['database'] ); | |
define('DB_USER', $db['login'] ); | |
define('DB_PASSWORD', $db['password'] ); | |
define ( 'WP_INSTALLING', true );//to trick wordpress | |
define ( 'WP_POST_REVISIONS', false ); | |
define ( 'SHORTINIT' , true ); | |
require_once Libraries::get('wp', 'path') . "/wp-load.php" ; | |
require_once Libraries::get('wp', 'path') . "/wp-includes/wp-db.php"; | |
require_once Libraries::get('wp', 'path') . "/wp-includes/registration.php"; | |
require_once Libraries::get('wp', 'path') . "/wp-admin/includes/taxonomy.php"; | |
require_once Libraries::get('wp', 'path') . "/wp-admin/includes/bookmark.php"; | |
require_once Libraries::get('wp', 'path') . "/wp-admin/includes/theme.php"; | |
require_once Libraries::get('wp', 'path') . "/wp-includes/kses.php"; | |
kses_init_filters(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment