예제 #1
0
 * @global object $wp_locale
 * @since 2.1.0
 */
$GLOBALS['wp_locale'] = new WP_Locale();
// Load the functions for the active theme, for both parent and child theme if applicable.
if (!defined('WP_INSTALLING') || 'wp-activate.php' === $pagenow) {
    if (TEMPLATEPATH !== STYLESHEETPATH && file_exists(STYLESHEETPATH . '/functions.php')) {
        include STYLESHEETPATH . '/functions.php';
    }
    if (file_exists(TEMPLATEPATH . '/functions.php')) {
        include TEMPLATEPATH . '/functions.php';
    }
}
do_action('after_setup_theme');
// Set up current user.
$wp->init();
/**
 * Most of WP is loaded at this stage, and the user is authenticated. WP continues
 * to load on the init hook that follows (e.g. widgets), and many plugins instantiate
 * themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).
 *
 * If you wish to plug an action once WP is loaded, use the wp_loaded hook below.
 */
do_action('init');
// Check site status
if (is_multisite()) {
    if (true !== ($file = ms_site_check())) {
        require $file;
        die;
    }
    unset($file);