Rearrange load order. Init classes before loading the text domain and setting the template path.
git-svn-id: https://develop.svn.wordpress.org/trunk@2706 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3c68ad0b0f
commit
92bfe7a248
@ -131,14 +131,6 @@ if ( defined('WP_CACHE') && function_exists('wp_cache_postload') )
|
|||||||
|
|
||||||
do_action('plugins_loaded');
|
do_action('plugins_loaded');
|
||||||
|
|
||||||
define('TEMPLATEPATH', get_template_directory());
|
|
||||||
|
|
||||||
// Load the default text localization domain.
|
|
||||||
load_default_textdomain();
|
|
||||||
|
|
||||||
// Pull in locale data after loading text domain.
|
|
||||||
require_once(ABSPATH . WPINC . '/locale.php');
|
|
||||||
|
|
||||||
// If already slashed, strip.
|
// If already slashed, strip.
|
||||||
if ( get_magic_quotes_gpc() ) {
|
if ( get_magic_quotes_gpc() ) {
|
||||||
$_GET = stripslashes_deep($_GET );
|
$_GET = stripslashes_deep($_GET );
|
||||||
@ -153,16 +145,24 @@ $_POST = add_magic_quotes($_POST );
|
|||||||
$_COOKIE = add_magic_quotes($_COOKIE);
|
$_COOKIE = add_magic_quotes($_COOKIE);
|
||||||
$_SERVER = add_magic_quotes($_SERVER);
|
$_SERVER = add_magic_quotes($_SERVER);
|
||||||
|
|
||||||
function shutdown_action_hook() {
|
|
||||||
do_action('shutdown');
|
|
||||||
}
|
|
||||||
register_shutdown_function('shutdown_action_hook');
|
|
||||||
|
|
||||||
$wp_query = new WP_Query();
|
$wp_query = new WP_Query();
|
||||||
$wp_rewrite = new WP_Rewrite();
|
$wp_rewrite = new WP_Rewrite();
|
||||||
$wp = new WP();
|
$wp = new WP();
|
||||||
$wp_roles = new WP_Roles();
|
$wp_roles = new WP_Roles();
|
||||||
|
|
||||||
|
define('TEMPLATEPATH', get_template_directory());
|
||||||
|
|
||||||
|
// Load the default text localization domain.
|
||||||
|
load_default_textdomain();
|
||||||
|
|
||||||
|
// Pull in locale data after loading text domain.
|
||||||
|
require_once(ABSPATH . WPINC . '/locale.php');
|
||||||
|
|
||||||
|
function shutdown_action_hook() {
|
||||||
|
do_action('shutdown');
|
||||||
|
}
|
||||||
|
register_shutdown_function('shutdown_action_hook');
|
||||||
|
|
||||||
// Everything is loaded and initialized.
|
// Everything is loaded and initialized.
|
||||||
do_action('init');
|
do_action('init');
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user