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