Files
WordPress/wp-settings.php
T

224 lines
5.3 KiB
PHP
Raw Normal View History

<?php
/**
* Used to setup and fix common variables and include
* the WordPress procedural and class library.
*
* Allows for some configuration in wp-config.php (see default-constants.php)
*
* @package WordPress
*/
2010-01-10 18:10:51 +00:00
/**
* Stores the location of the WordPress directory of functions, classes, and core content.
2010-01-10 18:10:51 +00:00
*
* @since 1.0.0
2010-01-10 18:10:51 +00:00
*/
define('WPINC', 'wp-includes');
2010-01-10 18:10:51 +00:00
require (ABSPATH . WPINC . '/load.php');
require (ABSPATH . WPINC . '/default-constants.php');
require (ABSPATH . WPINC . '/version.php');
wp_default_constants('init');
set_magic_quotes_runtime(0);
@ini_set('magic_quotes_sybase', 0);
if ( function_exists('date_default_timezone_set') )
date_default_timezone_set('UTC');
2007-09-03 23:32:58 +00:00
wp_unregister_GLOBALS();
2008-01-09 17:48:00 +00:00
unset( $wp_filter, $cache_lastcommentmodified, $cache_lastpostdate );
2005-08-09 22:38:32 +00:00
wp_fix_server_vars();
2005-11-10 23:57:45 +00:00
wp_check_php_mysql_versions();
wp_maintenance();
timer_start();
wp_debug_mode();
2004-01-02 23:55:40 +00:00
// For an advanced caching plugin to use, static because you would only want one
if ( WP_CACHE )
@include WP_CONTENT_DIR . '/advanced-cache.php';
wp_set_lang_dir();
require (ABSPATH . WPINC . '/compat.php');
require (ABSPATH . WPINC . '/functions.php');
require (ABSPATH . WPINC . '/classes.php');
require_wp_db();
wp_set_wpdb_vars();
2009-04-15 19:14:43 +00:00
wp_start_object_cache();
if( is_multisite() )
2010-01-10 18:10:51 +00:00
require (ABSPATH . WPINC . '/ms-load.php');
2006-06-20 02:03:24 +00:00
require (ABSPATH . WPINC . '/plugin.php');
2005-02-07 07:46:41 +00:00
require (ABSPATH . WPINC . '/default-filters.php');
include_once(ABSPATH . WPINC . '/pomo/mo.php');
2010-01-10 18:10:51 +00:00
if( is_multisite() && SHORTINIT ) // stop most of WP being loaded, we just want the basics
2010-01-10 18:10:51 +00:00
return false;
2006-06-15 07:24:44 +00:00
require_once (ABSPATH . WPINC . '/l10n.php');
2004-12-19 07:26:43 +00:00
wp_not_installed();
2004-12-19 07:26:43 +00:00
2006-06-11 06:43:54 +00:00
require (ABSPATH . WPINC . '/formatting.php');
require (ABSPATH . WPINC . '/capabilities.php');
require (ABSPATH . WPINC . '/query.php');
2006-04-18 04:44:33 +00:00
require (ABSPATH . WPINC . '/theme.php');
require (ABSPATH . WPINC . '/user.php');
require (ABSPATH . WPINC . '/meta.php');
2006-06-11 06:43:54 +00:00
require (ABSPATH . WPINC . '/general-template.php');
require (ABSPATH . WPINC . '/link-template.php');
require (ABSPATH . WPINC . '/author-template.php');
require (ABSPATH . WPINC . '/post.php');
require (ABSPATH . WPINC . '/post-template.php');
2006-06-04 22:40:53 +00:00
require (ABSPATH . WPINC . '/category.php');
require (ABSPATH . WPINC . '/category-template.php');
2006-04-19 02:32:12 +00:00
require (ABSPATH . WPINC . '/comment.php');
require (ABSPATH . WPINC . '/comment-template.php');
require (ABSPATH . WPINC . '/rewrite.php');
2006-06-11 06:43:54 +00:00
require (ABSPATH . WPINC . '/feed.php');
2006-06-05 02:12:59 +00:00
require (ABSPATH . WPINC . '/bookmark.php');
require (ABSPATH . WPINC . '/bookmark-template.php');
2004-04-27 23:17:16 +00:00
require (ABSPATH . WPINC . '/kses.php');
2006-03-07 21:43:59 +00:00
require (ABSPATH . WPINC . '/cron.php');
require (ABSPATH . WPINC . '/deprecated.php');
2006-05-22 17:16:05 +00:00
require (ABSPATH . WPINC . '/script-loader.php');
require (ABSPATH . WPINC . '/taxonomy.php');
require (ABSPATH . WPINC . '/update.php');
require (ABSPATH . WPINC . '/canonical.php');
require (ABSPATH . WPINC . '/shortcodes.php');
require (ABSPATH . WPINC . '/media.php');
require (ABSPATH . WPINC . '/http.php');
require (ABSPATH . WPINC . '/widgets.php');
2010-01-06 20:19:35 +00:00
if ( is_multisite() ) {
require_once( ABSPATH . WPINC . '/ms-functions.php' );
require_once( ABSPATH . WPINC . '/ms-default-filters.php' );
require_once( ABSPATH . WPINC . '/ms-deprecated.php' );
2010-01-06 20:19:35 +00:00
}
wp_default_constants('wp_included');
2010-01-10 18:10:51 +00:00
if( is_multisite() )
ms_network_settings();
wp_default_constants('ms_network_settings_loaded');
wp_load_mu_plugins();
2010-01-10 18:10:51 +00:00
/**
* Used to load network wide plugins
* @since 3.0
*/
if( is_multisite() )
ms_network_plugins();
2010-01-10 18:10:51 +00:00
do_action('muplugins_loaded');
2010-01-10 18:10:51 +00:00
/**
* Used to check site status
* @since 3.0
*/
if( is_multisite() ) {
ms_site_check();
ms_network_cookies();
2010-01-10 18:10:51 +00:00
}
wp_default_constants('ms_loaded');
2005-07-18 19:55:24 +00:00
2004-04-27 23:17:16 +00:00
require (ABSPATH . WPINC . '/vars.php');
2003-12-31 23:51:41 +00:00
// make taxonomies available to plugins and themes
// @plugin authors: warning: this gets registered again on the init hook
create_initial_taxonomies();
wp_load_plugins();
2004-04-19 05:19:45 +00:00
2006-06-11 06:43:54 +00:00
require (ABSPATH . WPINC . '/pluggable.php');
wp_set_internal_encoding();
if ( WP_CACHE && function_exists('wp_cache_postload') )
wp_cache_postload();
do_action('plugins_loaded');
wp_default_constants('plugins_loaded');
wp_magic_quotes();
2006-06-22 20:52:12 +00:00
do_action('sanitize_comment_cookies');
/**
* WordPress Query object
* @global object $wp_the_query
2008-01-09 17:48:00 +00:00
* @since 2.0.0
*/
$wp_the_query =& new WP_Query();
/**
* Holds the reference to @see $wp_the_query
* Use this global for WordPress queries
* @global object $wp_query
2008-01-09 17:48:00 +00:00
* @since 1.5.0
*/
$wp_query =& $wp_the_query;
/**
* Holds the WordPress Rewrite object for creating pretty URLs
* @global object $wp_rewrite
2008-01-09 17:48:00 +00:00
* @since 1.5.0
*/
$wp_rewrite =& new WP_Rewrite();
/**
* WordPress Object
* @global object $wp
2008-01-09 17:48:00 +00:00
* @since 2.0.0
*/
$wp =& new WP();
2009-03-17 23:44:36 +00:00
/**
* WordPress Widget Factory Object
* @global object $wp_widget_factory
* @since 2.8.0
*/
$wp_widget_factory =& new WP_Widget_Factory();
do_action('setup_theme');
wp_default_constants('setup_theme');
// Load the default text localization domain.
load_default_textdomain();
wp_find_locale();
/**
* WordPress Locale object for loading locale domain date and various strings.
* @global object $wp_locale
2008-01-09 17:48:00 +00:00
* @since 2.1.0
*/
2006-11-19 00:12:57 +00:00
$wp_locale =& new WP_Locale();
2006-04-02 00:20:11 +00:00
wp_load_theme_functions();
register_shutdown_function('shutdown_action_hook');
$wp->init(); // Sets up current user.
// Everything is loaded and initialized.
do_action('init');
2005-11-11 01:37:25 +00:00
?>