[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/ -> wp-settings.php (source)

   1  <?php
   2  /**
   3   * Used to set up and fix common variables and include
   4   * the WordPress procedural and class library.
   5   *
   6   * Allows for some configuration in wp-config.php (see default-constants.php)
   7   *
   8   * @package WordPress
   9   */
  10  
  11  /**
  12   * Stores the location of the WordPress directory of functions, classes, and core content.
  13   *
  14   * @since 1.0.0
  15   */
  16  define( 'WPINC', 'wp-includes' );
  17  
  18  /*
  19   * These can't be directly globalized in version.php. When updating,
  20   * we're including version.php from another installation and don't want
  21   * these values to be overridden if already set.
  22   */
  23  global $wp_version, $wp_db_version, $tinymce_version, $required_php_version, $required_mysql_version, $wp_local_package;
  24  require ( ABSPATH . WPINC . '/version.php' );
  25  require( ABSPATH . WPINC . '/load.php' );
  26  
  27  // Check for the required PHP version and for the MySQL extension or a database drop-in.
  28  wp_check_php_mysql_versions();
  29  
  30  // Include files required for initialization.
  31  require( ABSPATH . WPINC . '/class-wp-paused-extensions-storage.php' );
  32  require( ABSPATH . WPINC . '/class-wp-fatal-error-handler.php' );
  33  require( ABSPATH . WPINC . '/class-wp-recovery-mode-cookie-service.php' );
  34  require( ABSPATH . WPINC . '/class-wp-recovery-mode-key-service.php' );
  35  require( ABSPATH . WPINC . '/class-wp-recovery-mode-link-service.php' );
  36  require( ABSPATH . WPINC . '/class-wp-recovery-mode-email-service.php' );
  37  require( ABSPATH . WPINC . '/class-wp-recovery-mode.php' );
  38  require( ABSPATH . WPINC . '/error-protection.php' );
  39  require( ABSPATH . WPINC . '/default-constants.php' );
  40  require_once( ABSPATH . WPINC . '/plugin.php' );
  41  
  42  /**
  43   * If not already configured, `$blog_id` will default to 1 in a single site
  44   * configuration. In multisite, it will be overridden by default in ms-settings.php.
  45   *
  46   * @global int $blog_id
  47   * @since 2.0.0
  48   */
  49  global $blog_id;
  50  
  51  // Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, SCRIPT_DEBUG, WP_CONTENT_DIR and WP_CACHE.
  52  wp_initial_constants();
  53  
  54  // Make sure we register the shutdown handler for fatal errors as soon as possible.
  55  wp_register_fatal_error_handler();
  56  
  57  // WordPress calculates offsets from UTC.
  58  date_default_timezone_set( 'UTC' );
  59  
  60  // Turn register_globals off.
  61  wp_unregister_GLOBALS();
  62  
  63  // Standardize $_SERVER variables across setups.
  64  wp_fix_server_vars();
  65  
  66  // Check if we're in maintenance mode.
  67  wp_maintenance();
  68  
  69  // Start loading timer.
  70  timer_start();
  71  
  72  // Check if we're in WP_DEBUG mode.
  73  wp_debug_mode();
  74  
  75  /**
  76   * Filters whether to enable loading of the advanced-cache.php drop-in.
  77   *
  78   * This filter runs before it can be used by plugins. It is designed for non-web
  79   * run-times. If false is returned, advanced-cache.php will never be loaded.
  80   *
  81   * @since 4.6.0
  82   *
  83   * @param bool $enable_advanced_cache Whether to enable loading advanced-cache.php (if present).
  84   *                                    Default true.
  85   */
  86  if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) && file_exists( WP_CONTENT_DIR . '/advanced-cache.php' ) ) {
  87      // For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
  88      include( WP_CONTENT_DIR . '/advanced-cache.php' );
  89  
  90      // Re-initialize any hooks added manually by advanced-cache.php
  91      if ( $wp_filter ) {
  92          $wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter );
  93      }
  94  }
  95  
  96  // Define WP_LANG_DIR if not set.
  97  wp_set_lang_dir();
  98  
  99  // Load early WordPress files.
 100  require( ABSPATH . WPINC . '/compat.php' );
 101  require( ABSPATH . WPINC . '/class-wp-list-util.php' );
 102  require( ABSPATH . WPINC . '/formatting.php' );
 103  require( ABSPATH . WPINC . '/meta.php' );
 104  require ( ABSPATH . WPINC . '/functions.php' );
 105  require( ABSPATH . WPINC . '/class-wp-meta-query.php' );
 106  require( ABSPATH . WPINC . '/class-wp-matchesmapregex.php' );
 107  require( ABSPATH . WPINC . '/class-wp.php' );
 108  require( ABSPATH . WPINC . '/class-wp-error.php' );
 109  require( ABSPATH . WPINC . '/pomo/mo.php' );
 110  
 111  // Include the wpdb class and, if present, a db.php database drop-in.
 112  global $wpdb;
 113  require_wp_db();
 114  
 115  // Set the database table prefix and the format specifiers for database table columns.
 116  $GLOBALS['table_prefix'] = $table_prefix;
 117  wp_set_wpdb_vars();
 118  
 119  // Start the WordPress object cache, or an external object cache if the drop-in is present.
 120  wp_start_object_cache();
 121  
 122  // Attach the default filters.
 123  require( ABSPATH . WPINC . '/default-filters.php' );
 124  
 125  // Initialize multisite if enabled.
 126  if ( is_multisite() ) {
 127      require( ABSPATH . WPINC . '/class-wp-site-query.php' );
 128      require( ABSPATH . WPINC . '/class-wp-network-query.php' );
 129      require( ABSPATH . WPINC . '/ms-blogs.php' );
 130      require( ABSPATH . WPINC . '/ms-settings.php' );
 131  } elseif ( ! defined( 'MULTISITE' ) ) {
 132      define( 'MULTISITE', false );
 133  }
 134  
 135  register_shutdown_function( 'shutdown_action_hook' );
 136  
 137  // Stop most of WordPress from being loaded if we just want the basics.
 138  if ( SHORTINIT ) {
 139      return false;
 140  }
 141  
 142  // Load the L10n library.
 143  require_once( ABSPATH . WPINC . '/l10n.php' );
 144  require_once( ABSPATH . WPINC . '/class-wp-locale.php' );
 145  require_once( ABSPATH . WPINC . '/class-wp-locale-switcher.php' );
 146  
 147  // Run the installer if WordPress is not installed.
 148  wp_not_installed();
 149  
 150  // Load most of WordPress.
 151  require( ABSPATH . WPINC . '/class-wp-walker.php' );
 152  require( ABSPATH . WPINC . '/class-wp-ajax-response.php' );
 153  require( ABSPATH . WPINC . '/capabilities.php' );
 154  require( ABSPATH . WPINC . '/class-wp-roles.php' );
 155  require( ABSPATH . WPINC . '/class-wp-role.php' );
 156  require( ABSPATH . WPINC . '/class-wp-user.php' );
 157  require( ABSPATH . WPINC . '/class-wp-query.php' );
 158  require( ABSPATH . WPINC . '/query.php' );
 159  require( ABSPATH . WPINC . '/class-wp-date-query.php' );
 160  require( ABSPATH . WPINC . '/theme.php' );
 161  require( ABSPATH . WPINC . '/class-wp-theme.php' );
 162  require( ABSPATH . WPINC . '/template.php' );
 163  require( ABSPATH . WPINC . '/class-wp-user-request.php' );
 164  require( ABSPATH . WPINC . '/user.php' );
 165  require( ABSPATH . WPINC . '/class-wp-user-query.php' );
 166  require ( ABSPATH . WPINC . '/class-wp-session-tokens.php' );
 167  require ( ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php' );
 168  require( ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php' );
 169  require( ABSPATH . WPINC . '/general-template.php' );
 170  require( ABSPATH . WPINC . '/link-template.php' );
 171  require( ABSPATH . WPINC . '/author-template.php' );
 172  require( ABSPATH . WPINC . '/post.php' );
 173  require( ABSPATH . WPINC . '/class-walker-page.php' );
 174  require( ABSPATH . WPINC . '/class-walker-page-dropdown.php' );
 175  require( ABSPATH . WPINC . '/class-wp-post-type.php' );
 176  require( ABSPATH . WPINC . '/class-wp-post.php' );
 177  require( ABSPATH . WPINC . '/post-template.php' );
 178  require( ABSPATH . WPINC . '/revision.php' );
 179  require( ABSPATH . WPINC . '/post-formats.php' );
 180  require( ABSPATH . WPINC . '/post-thumbnail-template.php' );
 181  require( ABSPATH . WPINC . '/category.php' );
 182  require( ABSPATH . WPINC . '/class-walker-category.php' );
 183  require( ABSPATH . WPINC . '/class-walker-category-dropdown.php' );
 184  require( ABSPATH . WPINC . '/category-template.php' );
 185  require( ABSPATH . WPINC . '/comment.php' );
 186  require( ABSPATH . WPINC . '/class-wp-comment.php' );
 187  require( ABSPATH . WPINC . '/class-wp-comment-query.php' );
 188  require( ABSPATH . WPINC . '/class-walker-comment.php' );
 189  require( ABSPATH . WPINC . '/comment-template.php' );
 190  require( ABSPATH . WPINC . '/rewrite.php' );
 191  require( ABSPATH . WPINC . '/class-wp-rewrite.php' );
 192  require( ABSPATH . WPINC . '/feed.php' );
 193  require( ABSPATH . WPINC . '/bookmark.php' );
 194  require( ABSPATH . WPINC . '/bookmark-template.php' );
 195  require ( ABSPATH . WPINC . '/kses.php' );
 196  require( ABSPATH . WPINC . '/cron.php' );
 197  require( ABSPATH . WPINC . '/deprecated.php' );
 198  require( ABSPATH . WPINC . '/script-loader.php' );
 199  require( ABSPATH . WPINC . '/taxonomy.php' );
 200  require( ABSPATH . WPINC . '/class-wp-taxonomy.php' );
 201  require( ABSPATH . WPINC . '/class-wp-term.php' );
 202  require( ABSPATH . WPINC . '/class-wp-term-query.php' );
 203  require( ABSPATH . WPINC . '/class-wp-tax-query.php' );
 204  require( ABSPATH . WPINC . '/update.php' );
 205  require( ABSPATH . WPINC . '/canonical.php' );
 206  require( ABSPATH . WPINC . '/shortcodes.php' );
 207  require( ABSPATH . WPINC . '/embed.php' );
 208  require( ABSPATH . WPINC . '/class-wp-embed.php' );
 209  require( ABSPATH . WPINC . '/class-wp-oembed.php' );
 210  require( ABSPATH . WPINC . '/class-wp-oembed-controller.php' );
 211  require( ABSPATH . WPINC . '/media.php' );
 212  require( ABSPATH . WPINC . '/http.php' );
 213  require( ABSPATH . WPINC . '/class-http.php' );
 214  require( ABSPATH . WPINC . '/class-wp-http-streams.php' );
 215  require( ABSPATH . WPINC . '/class-wp-http-curl.php' );
 216  require( ABSPATH . WPINC . '/class-wp-http-proxy.php' );
 217  require( ABSPATH . WPINC . '/class-wp-http-cookie.php' );
 218  require( ABSPATH . WPINC . '/class-wp-http-encoding.php' );
 219  require( ABSPATH . WPINC . '/class-wp-http-response.php' );
 220  require( ABSPATH . WPINC . '/class-wp-http-requests-response.php' );
 221  require( ABSPATH . WPINC . '/class-wp-http-requests-hooks.php' );
 222  require( ABSPATH . WPINC . '/widgets.php' );
 223  require( ABSPATH . WPINC . '/class-wp-widget.php' );
 224  require( ABSPATH . WPINC . '/class-wp-widget-factory.php' );
 225  require( ABSPATH . WPINC . '/nav-menu.php' );
 226  require( ABSPATH . WPINC . '/nav-menu-template.php' );
 227  require( ABSPATH . WPINC . '/admin-bar.php' );
 228  require( ABSPATH . WPINC . '/rest-api.php' );
 229  require( ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php' );
 230  require( ABSPATH . WPINC . '/rest-api/class-wp-rest-response.php' );
 231  require( ABSPATH . WPINC . '/rest-api/class-wp-rest-request.php' );
 232  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-controller.php' );
 233  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-posts-controller.php' );
 234  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-attachments-controller.php' );
 235  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-types-controller.php' );
 236  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-statuses-controller.php' );
 237  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-revisions-controller.php' );
 238  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-autosaves-controller.php' );
 239  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-taxonomies-controller.php' );
 240  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-terms-controller.php' );
 241  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-users-controller.php' );
 242  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-comments-controller.php' );
 243  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-search-controller.php' );
 244  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-blocks-controller.php' );
 245  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-renderer-controller.php' );
 246  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-settings-controller.php' );
 247  require( ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-themes-controller.php' );
 248  require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-meta-fields.php' );
 249  require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-comment-meta-fields.php' );
 250  require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-post-meta-fields.php' );
 251  require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-term-meta-fields.php' );
 252  require( ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-user-meta-fields.php' );
 253  require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-search-handler.php' );
 254  require( ABSPATH . WPINC . '/rest-api/search/class-wp-rest-post-search-handler.php' );
 255  require( ABSPATH . WPINC . '/class-wp-block-type.php' );
 256  require( ABSPATH . WPINC . '/class-wp-block-styles-registry.php' );
 257  require( ABSPATH . WPINC . '/class-wp-block-type-registry.php' );
 258  require( ABSPATH . WPINC . '/class-wp-block-parser.php' );
 259  require( ABSPATH . WPINC . '/blocks.php' );
 260  require( ABSPATH . WPINC . '/blocks/archives.php' );
 261  require( ABSPATH . WPINC . '/blocks/block.php' );
 262  require( ABSPATH . WPINC . '/blocks/calendar.php' );
 263  require( ABSPATH . WPINC . '/blocks/categories.php' );
 264  require( ABSPATH . WPINC . '/blocks/latest-comments.php' );
 265  require( ABSPATH . WPINC . '/blocks/latest-posts.php' );
 266  require( ABSPATH . WPINC . '/blocks/rss.php' );
 267  require( ABSPATH . WPINC . '/blocks/search.php' );
 268  require( ABSPATH . WPINC . '/blocks/shortcode.php' );
 269  require( ABSPATH . WPINC . '/blocks/tag-cloud.php' );
 270  
 271  $GLOBALS['wp_embed'] = new WP_Embed();
 272  
 273  // Load multisite-specific files.
 274  if ( is_multisite() ) {
 275      require( ABSPATH . WPINC . '/ms-functions.php' );
 276      require( ABSPATH . WPINC . '/ms-default-filters.php' );
 277      require( ABSPATH . WPINC . '/ms-deprecated.php' );
 278  }
 279  
 280  // Define constants that rely on the API to obtain the default value.
 281  // Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in.
 282  wp_plugin_directory_constants();
 283  
 284  $GLOBALS['wp_plugin_paths'] = array();
 285  
 286  // Load must-use plugins.
 287  foreach ( wp_get_mu_plugins() as $mu_plugin ) {
 288      include_once( $mu_plugin );
 289  
 290      /**
 291       * Fires once a single must-use plugin has loaded.
 292       *
 293       * @since 5.1.0
 294       *
 295       * @param string $mu_plugin Full path to the plugin's main file.
 296       */
 297      do_action( 'mu_plugin_loaded', $mu_plugin );
 298  }
 299  unset( $mu_plugin );
 300  
 301  // Load network activated plugins.
 302  if ( is_multisite() ) {
 303      foreach ( wp_get_active_network_plugins() as $network_plugin ) {
 304          wp_register_plugin_realpath( $network_plugin );
 305          include_once( $network_plugin );
 306  
 307          /**
 308           * Fires once a single network-activated plugin has loaded.
 309           *
 310           * @since 5.1.0
 311           *
 312           * @param string $network_plugin Full path to the plugin's main file.
 313           */
 314          do_action( 'network_plugin_loaded', $network_plugin );
 315      }
 316      unset( $network_plugin );
 317  }
 318  
 319  /**
 320   * Fires once all must-use and network-activated plugins have loaded.
 321   *
 322   * @since 2.8.0
 323   */
 324  do_action( 'muplugins_loaded' );
 325  
 326  if ( is_multisite() ) {
 327      ms_cookie_constants();
 328  }
 329  
 330  // Define constants after multisite is loaded.
 331  wp_cookie_constants();
 332  
 333  // Define and enforce our SSL constants
 334  wp_ssl_constants();
 335  
 336  // Create common globals.
 337  require( ABSPATH . WPINC . '/vars.php' );
 338  
 339  // Make taxonomies and posts available to plugins and themes.
 340  // @plugin authors: warning: these get registered again on the init hook.
 341  create_initial_taxonomies();
 342  create_initial_post_types();
 343  
 344  wp_start_scraping_edited_file_errors();
 345  
 346  // Register the default theme directory root
 347  register_theme_directory( get_theme_root() );
 348  
 349  if ( ! is_multisite() ) {
 350      // Handle users requesting a recovery mode link and initiating recovery mode.
 351      wp_recovery_mode()->initialize();
 352  }
 353  
 354  // Create an instance of WP_Site_Health so that Cron events may fire.
 355  if ( ! class_exists( 'WP_Site_Health' ) ) {
 356      require_once ( ABSPATH . 'wp-admin/includes/class-wp-site-health.php' );
 357  }
 358  WP_Site_Health::initialize();
 359  
 360  // Load active plugins.
 361  foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
 362      wp_register_plugin_realpath( $plugin );
 363      include_once( $plugin );
 364  
 365      /**
 366       * Fires once a single activated plugin has loaded.
 367       *
 368       * @since 5.1.0
 369       *
 370       * @param string $plugin Full path to the plugin's main file.
 371       */
 372      do_action( 'plugin_loaded', $plugin );
 373  }
 374  unset( $plugin );
 375  
 376  // Load pluggable functions.
 377  require ( ABSPATH . WPINC . '/pluggable.php' );
 378  require( ABSPATH . WPINC . '/pluggable-deprecated.php' );
 379  
 380  // Set internal encoding.
 381  wp_set_internal_encoding();
 382  
 383  // Run wp_cache_postload() if object cache is enabled and the function exists.
 384  if ( WP_CACHE && function_exists( 'wp_cache_postload' ) ) {
 385      wp_cache_postload();
 386  }
 387  
 388  /**
 389   * Fires once activated plugins have loaded.
 390   *
 391   * Pluggable functions are also available at this point in the loading order.
 392   *
 393   * @since 1.5.0
 394   */
 395  do_action( 'plugins_loaded' );
 396  
 397  // Define constants which affect functionality if not already defined.
 398  wp_functionality_constants();
 399  
 400  // Add magic quotes and set up $_REQUEST ( $_GET + $_POST )
 401  wp_magic_quotes();
 402  
 403  /**
 404   * Fires when comment cookies are sanitized.
 405   *
 406   * @since 2.0.11
 407   */
 408  do_action( 'sanitize_comment_cookies' );
 409  
 410  /**
 411   * WordPress Query object
 412   *
 413   * @global WP_Query $wp_the_query WordPress Query object.
 414   * @since 2.0.0
 415   */
 416  $GLOBALS['wp_the_query'] = new WP_Query();
 417  
 418  /**
 419   * Holds the reference to @see $wp_the_query
 420   * Use this global for WordPress queries
 421   *
 422   * @global WP_Query $wp_query WordPress Query object.
 423   * @since 1.5.0
 424   */
 425  $GLOBALS['wp_query'] = $GLOBALS['wp_the_query'];
 426  
 427  /**
 428   * Holds the WordPress Rewrite object for creating pretty URLs
 429   *
 430   * @global WP_Rewrite $wp_rewrite WordPress rewrite component.
 431   * @since 1.5.0
 432   */
 433  $GLOBALS['wp_rewrite'] = new WP_Rewrite();
 434  
 435  /**
 436   * WordPress Object
 437   *
 438   * @global WP $wp Current WordPress environment instance.
 439   * @since 2.0.0
 440   */
 441  $GLOBALS['wp'] = new WP();
 442  
 443  /**
 444   * WordPress Widget Factory Object
 445   *
 446   * @global WP_Widget_Factory $wp_widget_factory
 447   * @since 2.8.0
 448   */
 449  $GLOBALS['wp_widget_factory'] = new WP_Widget_Factory();
 450  
 451  /**
 452   * WordPress User Roles
 453   *
 454   * @global WP_Roles $wp_roles WordPress role management object.
 455   * @since 2.0.0
 456   */
 457  $GLOBALS['wp_roles'] = new WP_Roles();
 458  
 459  /**
 460   * Fires before the theme is loaded.
 461   *
 462   * @since 2.6.0
 463   */
 464  do_action( 'setup_theme' );
 465  
 466  // Define the template related constants.
 467  wp_templating_constants();
 468  
 469  // Load the default text localization domain.
 470  load_default_textdomain();
 471  
 472  $locale      = get_locale();
 473  $locale_file = WP_LANG_DIR . "/$locale.php";
 474  if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) ) {
 475      require( $locale_file );
 476  }
 477  unset( $locale_file );
 478  
 479  /**
 480   * WordPress Locale object for loading locale domain date and various strings.
 481   *
 482   * @global WP_Locale $wp_locale WordPress date and time locale object.
 483   * @since 2.1.0
 484   */
 485  $GLOBALS['wp_locale'] = new WP_Locale();
 486  
 487  /**
 488   *  WordPress Locale Switcher object for switching locales.
 489   *
 490   * @since 4.7.0
 491   *
 492   * @global WP_Locale_Switcher $wp_locale_switcher WordPress locale switcher object.
 493   */
 494  $GLOBALS['wp_locale_switcher'] = new WP_Locale_Switcher();
 495  $GLOBALS['wp_locale_switcher']->init();
 496  
 497  // Load the functions for the active theme, for both parent and child theme if applicable.
 498  foreach ( wp_get_active_and_valid_themes() as $theme ) {
 499      if ( file_exists( $theme . '/functions.php' ) ) {
 500          include $theme . '/functions.php';
 501      }
 502  }
 503  unset( $theme );
 504  
 505  /**
 506   * Fires after the theme is loaded.
 507   *
 508   * @since 3.0.0
 509   */
 510  do_action( 'after_setup_theme' );
 511  
 512  // Set up current user.
 513  $GLOBALS['wp']->init();
 514  
 515  /**
 516   * Fires after WordPress has finished loading but before any headers are sent.
 517   *
 518   * Most of WP is loaded at this stage, and the user is authenticated. WP continues
 519   * to load on the {@see 'init'} hook that follows (e.g. widgets), and many plugins instantiate
 520   * themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.).
 521   *
 522   * If you wish to plug an action once WP is loaded, use the {@see 'wp_loaded'} hook below.
 523   *
 524   * @since 1.5.0
 525   */
 526  do_action( 'init' );
 527  
 528  // Check site status
 529  if ( is_multisite() ) {
 530      $file = ms_site_check();
 531      if ( true !== $file ) {
 532          require( $file );
 533          die();
 534      }
 535      unset( $file );
 536  }
 537  
 538  /**
 539   * This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated.
 540   *
 541   * Ajax requests should use wp-admin/admin-ajax.php. admin-ajax.php can handle requests for
 542   * users not logged in.
 543   *
 544   * @link https://codex.wordpress.org/AJAX_in_Plugins
 545   *
 546   * @since 3.0.0
 547   */
 548  do_action( 'wp_loaded' );


Generated: Mon Jan 27 01:00:03 2020 Cross-referenced by PHPXref 0.7.1