Changeset 14198
- Timestamp:
- 04/23/2010 04:18:33 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-load.php
r14070 r14198 38 38 function ms_site_check() { 39 39 global $wpdb, $current_blog; 40 41 // Allow short-circuiting 42 $check = apply_filters('ms_site_check', null); 43 if ( null !== $check ) 44 return; 45 46 // Allow super admins to see blocked sites 47 if ( is_super_admin() ) 48 return true; 40 49 41 50 if ( '1' == $current_blog->deleted ) { -
trunk/wp-settings.php
r14079 r14198 154 154 do_action( 'muplugins_loaded' ); 155 155 156 // Check site status if multisite. 156 if ( is_multisite() ) 157 ms_cookie_constants( ); 158 159 // Define constants after multisite is loaded. Cookie-related constants may be overridden in ms_network_cookies(). 160 wp_cookie_constants( ); 161 162 // Define and enforce our SSL constants 163 wp_ssl_constants( ); 164 165 // Create common globals. 166 require( ABSPATH . WPINC . '/vars.php' ); 167 168 // Make taxonomies and posts available to plugins and themes. 169 // @plugin authors: warning: these get registered again on the init hook. 170 create_initial_taxonomies(); 171 create_initial_post_types(); 172 173 // Load active plugins. 174 foreach ( wp_get_active_and_valid_plugins() as $plugin ) 175 include_once( $plugin ); 176 unset( $plugin ); 177 178 // Load pluggable functions. 179 require( ABSPATH . WPINC . '/pluggable.php' ); 180 require( ABSPATH . WPINC . '/pluggable-deprecated.php' ); 181 182 // Set internal encoding. 183 wp_set_internal_encoding(); 184 185 // Run wp_cache_postload() if object cache is enabled and the function exists. 186 if ( WP_CACHE && function_exists( 'wp_cache_postload' ) ) 187 wp_cache_postload(); 188 189 do_action( 'plugins_loaded' ); 190 191 // Define constants which affect functionality if not already defined. 192 wp_functionality_constants( ); 193 194 // Add magic quotes and set up $_REQUEST ( $_GET + $_POST ) 195 wp_magic_quotes(); 196 197 do_action( 'sanitize_comment_cookies' ); 198 199 /** 200 * WordPress Query object 201 * @global object $wp_the_query 202 * @since 2.0.0 203 */ 204 $wp_the_query =& new WP_Query(); 205 206 /** 207 * Holds the reference to @see $wp_the_query 208 * Use this global for WordPress queries 209 * @global object $wp_query 210 * @since 1.5.0 211 */ 212 $wp_query =& $wp_the_query; 213 214 /** 215 * Holds the WordPress Rewrite object for creating pretty URLs 216 * @global object $wp_rewrite 217 * @since 1.5.0 218 */ 219 $wp_rewrite =& new WP_Rewrite(); 220 221 /** 222 * WordPress Object 223 * @global object $wp 224 * @since 2.0.0 225 */ 226 $wp =& new WP(); 227 228 /** 229 * WordPress Widget Factory Object 230 * @global object $wp_widget_factory 231 * @since 2.8.0 232 */ 233 $wp_widget_factory =& new WP_Widget_Factory(); 234 235 do_action( 'setup_theme' ); 236 237 // Define the template related constants. 238 wp_templating_constants( ); 239 240 // Load the default text localization domain. 241 load_default_textdomain(); 242 243 // Find the blog locale. 244 $locale = get_locale(); 245 $locale_file = WP_LANG_DIR . "/$locale.php"; 246 if ( is_readable( $locale_file ) ) 247 require( $locale_file ); 248 unset($locale_file); 249 250 // Pull in locale data after loading text domain. 251 require( ABSPATH . WPINC . '/locale.php' ); 252 253 /** 254 * WordPress Locale object for loading locale domain date and various strings. 255 * @global object $wp_locale 256 * @since 2.1.0 257 */ 258 $wp_locale =& new WP_Locale(); 259 260 // Load the functions for the active theme, for both parent and child theme if applicable. 261 if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) ) 262 include( STYLESHEETPATH . '/functions.php' ); 263 if ( file_exists( TEMPLATEPATH . '/functions.php' ) ) 264 include( TEMPLATEPATH . '/functions.php' ); 265 266 do_action( 'after_setup_theme' ); 267 268 // Load any template functions the theme supports. 269 require_if_theme_supports( 'post-thumbnails', ABSPATH . WPINC . '/post-thumbnail-template.php' ); 270 271 register_shutdown_function( 'shutdown_action_hook' ); 272 273 // Set up current user. 274 $wp->init(); 275 276 /** 277 * Most of WP is loaded at this stage, and the user is authenticated. WP continues 278 * to load on the init hook that follows (e.g. widgets), and many plugins instantiate 279 * themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.). 280 * 281 * If you wish to plug an action once WP is loaded, use the wp_loaded hook below. 282 */ 283 do_action( 'init' ); 284 285 // Check site status 157 286 if ( is_multisite() ) { 158 287 if ( true !== ( $file = ms_site_check() ) ) { … … 161 290 } 162 291 unset($file); 163 164 ms_cookie_constants( );165 292 } 166 167 // Define constants after multisite is loaded. Cookie-related constants may be overridden in ms_network_cookies().168 wp_cookie_constants( );169 170 // Define and enforce our SSL constants171 wp_ssl_constants( );172 173 // Create common globals.174 require( ABSPATH . WPINC . '/vars.php' );175 176 // Make taxonomies and posts available to plugins and themes.177 // @plugin authors: warning: these get registered again on the init hook.178 create_initial_taxonomies();179 create_initial_post_types();180 181 // Load active plugins.182 foreach ( wp_get_active_and_valid_plugins() as $plugin )183 include_once( $plugin );184 unset( $plugin );185 186 // Load pluggable functions.187 require( ABSPATH . WPINC . '/pluggable.php' );188 require( ABSPATH . WPINC . '/pluggable-deprecated.php' );189 190 // Set internal encoding.191 wp_set_internal_encoding();192 193 // Run wp_cache_postload() if object cache is enabled and the function exists.194 if ( WP_CACHE && function_exists( 'wp_cache_postload' ) )195 wp_cache_postload();196 197 do_action( 'plugins_loaded' );198 199 // Define constants which affect functionality if not already defined.200 wp_functionality_constants( );201 202 // Add magic quotes and set up $_REQUEST ( $_GET + $_POST )203 wp_magic_quotes();204 205 do_action( 'sanitize_comment_cookies' );206 207 /**208 * WordPress Query object209 * @global object $wp_the_query210 * @since 2.0.0211 */212 $wp_the_query =& new WP_Query();213 214 /**215 * Holds the reference to @see $wp_the_query216 * Use this global for WordPress queries217 * @global object $wp_query218 * @since 1.5.0219 */220 $wp_query =& $wp_the_query;221 222 /**223 * Holds the WordPress Rewrite object for creating pretty URLs224 * @global object $wp_rewrite225 * @since 1.5.0226 */227 $wp_rewrite =& new WP_Rewrite();228 229 /**230 * WordPress Object231 * @global object $wp232 * @since 2.0.0233 */234 $wp =& new WP();235 236 /**237 * WordPress Widget Factory Object238 * @global object $wp_widget_factory239 * @since 2.8.0240 */241 $wp_widget_factory =& new WP_Widget_Factory();242 243 do_action( 'setup_theme' );244 245 // Define the template related constants.246 wp_templating_constants( );247 248 // Load the default text localization domain.249 load_default_textdomain();250 251 // Find the blog locale.252 $locale = get_locale();253 $locale_file = WP_LANG_DIR . "/$locale.php";254 if ( is_readable( $locale_file ) )255 require( $locale_file );256 unset($locale_file);257 258 // Pull in locale data after loading text domain.259 require( ABSPATH . WPINC . '/locale.php' );260 261 /**262 * WordPress Locale object for loading locale domain date and various strings.263 * @global object $wp_locale264 * @since 2.1.0265 */266 $wp_locale =& new WP_Locale();267 268 // Load the functions for the active theme, for both parent and child theme if applicable.269 if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )270 include( STYLESHEETPATH . '/functions.php' );271 if ( file_exists( TEMPLATEPATH . '/functions.php' ) )272 include( TEMPLATEPATH . '/functions.php' );273 274 do_action( 'after_setup_theme' );275 276 // Load any template functions the theme supports.277 require_if_theme_supports( 'post-thumbnails', ABSPATH . WPINC . '/post-thumbnail-template.php' );278 279 register_shutdown_function( 'shutdown_action_hook' );280 281 // Set up current user.282 $wp->init();283 284 /**285 * Most of WP is loaded at this stage, and the user is authenticated. WP continues286 * to load on the init hook that follows (e.g. widgets), and many plugins instantiate287 * themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).288 *289 * If you wish to plug an action once WP is loaded, use the wp_loaded hook below.290 */291 do_action( 'init' );292 293 293 294 /**
Note: See TracChangeset
for help on using the changeset viewer.