Allow for plugins to kick in before everything if define in wp-config

git-svn-id: https://develop.svn.wordpress.org/trunk@2342 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-02-15 00:46:58 +00:00
parent 9b6518f605
commit 2ef94eedf2
1 changed files with 11 additions and 1 deletions

View File

@ -31,6 +31,10 @@ timer_start();
// Change to E_ALL for development/debugging
error_reporting(E_ALL ^ E_NOTICE);
// For an advanced caching plugin to use, static because you would only want one
if ( defined('WP_CACHE') )
require (ABSPATH . 'wp-content/advanced-cache.php');
define('WPINC', 'wp-includes');
require_once (ABSPATH . WPINC . '/wp-db.php');
@ -89,7 +93,6 @@ require (ABSPATH . WPINC . '/kses.php');
require (ABSPATH . WPINC . '/version.php');
if (!strstr($_SERVER['PHP_SELF'], 'install.php') && !strstr($_SERVER['PHP_SELF'], 'wp-admin/import')) :
// Used to guarantee unique hash cookies
$cookiehash = md5(get_settings('siteurl')); // Remove in 1.4
define('COOKIEHASH', $cookiehash);
@ -97,6 +100,8 @@ endif;
require (ABSPATH . WPINC . '/vars.php');
do_action('core_files_loaded');
// Check for hacks file if the option is enabled
if (get_settings('hack_file')) {
if (file_exists(ABSPATH . '/my-hacks.php'))
@ -111,6 +116,11 @@ if ( get_settings('active_plugins') ) {
}
}
if ( defined('WP_CACHE') && function_exists('wp_cache_postload') )
wp_cache_postload();
do_action('plugins_loaded');
define('TEMPLATEPATH', get_template_directory());
// Load the default text localization domain.