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