[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Summary view] [Print] [Text view]
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 * Version information for the current WordPress release. 20 * 21 * These can't be directly globalized in version.php. When updating, 22 * include version.php from another installation and don't override 23 * these values if already set. 24 * 25 * @global string $wp_version The WordPress version string. 26 * @global int $wp_db_version WordPress database version. 27 * @global string $tinymce_version TinyMCE version. 28 * @global string $required_php_version The required PHP version string. 29 * @global string $required_mysql_version The required MySQL version string. 30 * @global string $wp_local_package Locale code of the package. 31 */ 32 global $wp_version, $wp_db_version, $tinymce_version, $required_php_version, $required_mysql_version, $wp_local_package; 33 require ABSPATH . WPINC . '/version.php'; 34 require ABSPATH . WPINC . '/compat.php'; 35 require ABSPATH . WPINC . '/load.php'; 36 37 // Check for the required PHP version and for the MySQL extension or a database drop-in. 38 wp_check_php_mysql_versions(); 39 40 // Include files required for initialization. 41 require ABSPATH . WPINC . '/class-wp-paused-extensions-storage.php'; 42 require ABSPATH . WPINC . '/class-wp-exception.php'; 43 require ABSPATH . WPINC . '/class-wp-fatal-error-handler.php'; 44 require ABSPATH . WPINC . '/class-wp-recovery-mode-cookie-service.php'; 45 require ABSPATH . WPINC . '/class-wp-recovery-mode-key-service.php'; 46 require ABSPATH . WPINC . '/class-wp-recovery-mode-link-service.php'; 47 require ABSPATH . WPINC . '/class-wp-recovery-mode-email-service.php'; 48 require ABSPATH . WPINC . '/class-wp-recovery-mode.php'; 49 require ABSPATH . WPINC . '/error-protection.php'; 50 require ABSPATH . WPINC . '/default-constants.php'; 51 require_once ABSPATH . WPINC . '/plugin.php'; 52 53 /** 54 * If not already configured, `$blog_id` will default to 1 in a single site 55 * configuration. In multisite, it will be overridden by default in ms-settings.php. 56 * 57 * @since 2.0.0 58 * 59 * @global int $blog_id 60 */ 61 global $blog_id; 62 63 // Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, SCRIPT_DEBUG, WP_CONTENT_DIR and WP_CACHE. 64 wp_initial_constants(); 65 66 // Register the shutdown handler for fatal errors as soon as possible. 67 wp_register_fatal_error_handler(); 68 69 // WordPress calculates offsets from UTC. 70 // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set 71 date_default_timezone_set( 'UTC' ); 72 73 // Standardize $_SERVER variables across setups. 74 wp_fix_server_vars(); 75 76 // Check if the site is in maintenance mode. 77 wp_maintenance(); 78 79 // Start loading timer. 80 timer_start(); 81 82 // Check if WP_DEBUG mode is enabled. 83 wp_debug_mode(); 84 85 /** 86 * Filters whether to enable loading of the advanced-cache.php drop-in. 87 * 88 * This filter runs before it can be used by plugins. It is designed for non-web 89 * run-times. If false is returned, advanced-cache.php will never be loaded. 90 * 91 * @since 4.6.0 92 * 93 * @param bool $enable_advanced_cache Whether to enable loading advanced-cache.php (if present). 94 * Default true. 95 */ 96 if ( WP_CACHE && apply_filters( 'enable_loading_advanced_cache_dropin', true ) && file_exists( WP_CONTENT_DIR . '/advanced-cache.php' ) ) { 97 // For an advanced caching plugin to use. Uses a static drop-in because you would only want one. 98 include WP_CONTENT_DIR . '/advanced-cache.php'; 99 100 // Re-initialize any hooks added manually by advanced-cache.php. 101 if ( $wp_filter ) { 102 $wp_filter = WP_Hook::build_preinitialized_hooks( $wp_filter ); 103 } 104 } 105 106 // Define WP_LANG_DIR if not set. 107 wp_set_lang_dir(); 108 109 // Load early WordPress files. 110 require ABSPATH . WPINC . '/class-wp-list-util.php'; 111 require ABSPATH . WPINC . '/class-wp-token-map.php'; 112 require ABSPATH . WPINC . '/formatting.php'; 113 require ABSPATH . WPINC . '/meta.php'; 114 require ABSPATH . WPINC . '/functions.php'; 115 require ABSPATH . WPINC . '/class-wp-meta-query.php'; 116 require ABSPATH . WPINC . '/class-wp-matchesmapregex.php'; 117 require ABSPATH . WPINC . '/class-wp.php'; 118 require ABSPATH . WPINC . '/class-wp-error.php'; 119 require ABSPATH . WPINC . '/pomo/mo.php'; 120 require ABSPATH . WPINC . '/l10n/class-wp-translation-controller.php'; 121 require ABSPATH . WPINC . '/l10n/class-wp-translations.php'; 122 require ABSPATH . WPINC . '/l10n/class-wp-translation-file.php'; 123 require ABSPATH . WPINC . '/l10n/class-wp-translation-file-mo.php'; 124 require ABSPATH . WPINC . '/l10n/class-wp-translation-file-php.php'; 125 126 /** 127 * @since 0.71 128 * 129 * @global wpdb $wpdb WordPress database abstraction object. 130 */ 131 global $wpdb; 132 // Include the wpdb class and, if present, a db.php database drop-in. 133 require_wp_db(); 134 135 /** 136 * @since 3.3.0 137 * 138 * @global string $table_prefix The database table prefix. 139 */ 140 $GLOBALS['table_prefix'] = $table_prefix; 141 142 // Set the database table prefix and the format specifiers for database table columns. 143 wp_set_wpdb_vars(); 144 145 // Start the WordPress object cache, or an external object cache if the drop-in is present. 146 wp_start_object_cache(); 147 148 // Attach the default filters. 149 require ABSPATH . WPINC . '/default-filters.php'; 150 151 // Initialize multisite if enabled. 152 if ( is_multisite() ) { 153 require ABSPATH . WPINC . '/class-wp-site-query.php'; 154 require ABSPATH . WPINC . '/class-wp-network-query.php'; 155 require ABSPATH . WPINC . '/ms-blogs.php'; 156 require ABSPATH . WPINC . '/ms-settings.php'; 157 } elseif ( ! defined( 'MULTISITE' ) ) { 158 define( 'MULTISITE', false ); 159 } 160 161 register_shutdown_function( 'shutdown_action_hook' ); 162 163 // Stop most of WordPress from being loaded if SHORTINIT is enabled. 164 if ( SHORTINIT ) { 165 return false; 166 } 167 168 // Load the L10n library. 169 require_once ABSPATH . WPINC . '/l10n.php'; 170 require_once ABSPATH . WPINC . '/class-wp-textdomain-registry.php'; 171 require_once ABSPATH . WPINC . '/class-wp-locale.php'; 172 require_once ABSPATH . WPINC . '/class-wp-locale-switcher.php'; 173 174 // Run the installer if WordPress is not installed. 175 wp_not_installed(); 176 177 // Load most of WordPress. 178 require ABSPATH . WPINC . '/class-wp-walker.php'; 179 require ABSPATH . WPINC . '/class-wp-ajax-response.php'; 180 require ABSPATH . WPINC . '/capabilities.php'; 181 require ABSPATH . WPINC . '/class-wp-roles.php'; 182 require ABSPATH . WPINC . '/class-wp-role.php'; 183 require ABSPATH . WPINC . '/class-wp-user.php'; 184 require ABSPATH . WPINC . '/class-wp-query.php'; 185 require ABSPATH . WPINC . '/query.php'; 186 require ABSPATH . WPINC . '/class-wp-date-query.php'; 187 require ABSPATH . WPINC . '/theme.php'; 188 require ABSPATH . WPINC . '/class-wp-theme.php'; 189 require ABSPATH . WPINC . '/class-wp-theme-json-schema.php'; 190 require ABSPATH . WPINC . '/class-wp-theme-json-data.php'; 191 require ABSPATH . WPINC . '/class-wp-theme-json.php'; 192 require ABSPATH . WPINC . '/class-wp-theme-json-resolver.php'; 193 require ABSPATH . WPINC . '/class-wp-duotone.php'; 194 require ABSPATH . WPINC . '/global-styles-and-settings.php'; 195 require ABSPATH . WPINC . '/class-wp-block-template.php'; 196 require ABSPATH . WPINC . '/class-wp-block-templates-registry.php'; 197 require ABSPATH . WPINC . '/block-template-utils.php'; 198 require ABSPATH . WPINC . '/block-template.php'; 199 require ABSPATH . WPINC . '/theme-templates.php'; 200 require ABSPATH . WPINC . '/theme-previews.php'; 201 require ABSPATH . WPINC . '/template.php'; 202 require ABSPATH . WPINC . '/https-detection.php'; 203 require ABSPATH . WPINC . '/https-migration.php'; 204 require ABSPATH . WPINC . '/class-wp-user-request.php'; 205 require ABSPATH . WPINC . '/user.php'; 206 require ABSPATH . WPINC . '/class-wp-user-query.php'; 207 require ABSPATH . WPINC . '/class-wp-session-tokens.php'; 208 require ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php'; 209 require ABSPATH . WPINC . '/general-template.php'; 210 require ABSPATH . WPINC . '/link-template.php'; 211 require ABSPATH . WPINC . '/author-template.php'; 212 require ABSPATH . WPINC . '/robots-template.php'; 213 require ABSPATH . WPINC . '/post.php'; 214 require ABSPATH . WPINC . '/class-walker-page.php'; 215 require ABSPATH . WPINC . '/class-walker-page-dropdown.php'; 216 require ABSPATH . WPINC . '/class-wp-post-type.php'; 217 require ABSPATH . WPINC . '/class-wp-post.php'; 218 require ABSPATH . WPINC . '/post-template.php'; 219 require ABSPATH . WPINC . '/revision.php'; 220 require ABSPATH . WPINC . '/post-formats.php'; 221 require ABSPATH . WPINC . '/post-thumbnail-template.php'; 222 require ABSPATH . WPINC . '/category.php'; 223 require ABSPATH . WPINC . '/class-walker-category.php'; 224 require ABSPATH . WPINC . '/class-walker-category-dropdown.php'; 225 require ABSPATH . WPINC . '/category-template.php'; 226 require ABSPATH . WPINC . '/comment.php'; 227 require ABSPATH . WPINC . '/class-wp-comment.php'; 228 require ABSPATH . WPINC . '/class-wp-comment-query.php'; 229 require ABSPATH . WPINC . '/class-walker-comment.php'; 230 require ABSPATH . WPINC . '/comment-template.php'; 231 require ABSPATH . WPINC . '/rewrite.php'; 232 require ABSPATH . WPINC . '/class-wp-rewrite.php'; 233 require ABSPATH . WPINC . '/feed.php'; 234 require ABSPATH . WPINC . '/bookmark.php'; 235 require ABSPATH . WPINC . '/bookmark-template.php'; 236 require ABSPATH . WPINC . '/kses.php'; 237 require ABSPATH . WPINC . '/cron.php'; 238 require ABSPATH . WPINC . '/deprecated.php'; 239 require ABSPATH . WPINC . '/script-loader.php'; 240 require ABSPATH . WPINC . '/taxonomy.php'; 241 require ABSPATH . WPINC . '/class-wp-taxonomy.php'; 242 require ABSPATH . WPINC . '/class-wp-term.php'; 243 require ABSPATH . WPINC . '/class-wp-term-query.php'; 244 require ABSPATH . WPINC . '/class-wp-tax-query.php'; 245 require ABSPATH . WPINC . '/update.php'; 246 require ABSPATH . WPINC . '/canonical.php'; 247 require ABSPATH . WPINC . '/shortcodes.php'; 248 require ABSPATH . WPINC . '/embed.php'; 249 require ABSPATH . WPINC . '/class-wp-embed.php'; 250 require ABSPATH . WPINC . '/class-wp-oembed.php'; 251 require ABSPATH . WPINC . '/class-wp-oembed-controller.php'; 252 require ABSPATH . WPINC . '/media.php'; 253 require ABSPATH . WPINC . '/http.php'; 254 require ABSPATH . WPINC . '/html-api/html5-named-character-references.php'; 255 require ABSPATH . WPINC . '/html-api/class-wp-html-attribute-token.php'; 256 require ABSPATH . WPINC . '/html-api/class-wp-html-span.php'; 257 require ABSPATH . WPINC . '/html-api/class-wp-html-doctype-info.php'; 258 require ABSPATH . WPINC . '/html-api/class-wp-html-text-replacement.php'; 259 require ABSPATH . WPINC . '/html-api/class-wp-html-decoder.php'; 260 require ABSPATH . WPINC . '/html-api/class-wp-html-tag-processor.php'; 261 require ABSPATH . WPINC . '/html-api/class-wp-html-unsupported-exception.php'; 262 require ABSPATH . WPINC . '/html-api/class-wp-html-active-formatting-elements.php'; 263 require ABSPATH . WPINC . '/html-api/class-wp-html-open-elements.php'; 264 require ABSPATH . WPINC . '/html-api/class-wp-html-token.php'; 265 require ABSPATH . WPINC . '/html-api/class-wp-html-stack-event.php'; 266 require ABSPATH . WPINC . '/html-api/class-wp-html-processor-state.php'; 267 require ABSPATH . WPINC . '/html-api/class-wp-html-processor.php'; 268 require ABSPATH . WPINC . '/class-wp-http.php'; 269 require ABSPATH . WPINC . '/class-wp-http-streams.php'; 270 require ABSPATH . WPINC . '/class-wp-http-curl.php'; 271 require ABSPATH . WPINC . '/class-wp-http-proxy.php'; 272 require ABSPATH . WPINC . '/class-wp-http-cookie.php'; 273 require ABSPATH . WPINC . '/class-wp-http-encoding.php'; 274 require ABSPATH . WPINC . '/class-wp-http-response.php'; 275 require ABSPATH . WPINC . '/class-wp-http-requests-response.php'; 276 require ABSPATH . WPINC . '/class-wp-http-requests-hooks.php'; 277 require ABSPATH . WPINC . '/widgets.php'; 278 require ABSPATH . WPINC . '/class-wp-widget.php'; 279 require ABSPATH . WPINC . '/class-wp-widget-factory.php'; 280 require ABSPATH . WPINC . '/nav-menu-template.php'; 281 require ABSPATH . WPINC . '/nav-menu.php'; 282 require ABSPATH . WPINC . '/admin-bar.php'; 283 require ABSPATH . WPINC . '/class-wp-application-passwords.php'; 284 require ABSPATH . WPINC . '/rest-api.php'; 285 require ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php'; 286 require ABSPATH . WPINC . '/rest-api/class-wp-rest-response.php'; 287 require ABSPATH . WPINC . '/rest-api/class-wp-rest-request.php'; 288 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-controller.php'; 289 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-posts-controller.php'; 290 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-attachments-controller.php'; 291 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-global-styles-controller.php'; 292 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-types-controller.php'; 293 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-post-statuses-controller.php'; 294 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-revisions-controller.php'; 295 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-global-styles-revisions-controller.php'; 296 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-template-revisions-controller.php'; 297 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-autosaves-controller.php'; 298 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-template-autosaves-controller.php'; 299 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-taxonomies-controller.php'; 300 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-terms-controller.php'; 301 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-menu-items-controller.php'; 302 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-menus-controller.php'; 303 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-menu-locations-controller.php'; 304 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-users-controller.php'; 305 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-comments-controller.php'; 306 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-search-controller.php'; 307 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-blocks-controller.php'; 308 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-types-controller.php'; 309 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-renderer-controller.php'; 310 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-settings-controller.php'; 311 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-themes-controller.php'; 312 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-plugins-controller.php'; 313 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-directory-controller.php'; 314 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php'; 315 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php'; 316 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-patterns-controller.php'; 317 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-pattern-categories-controller.php'; 318 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-application-passwords-controller.php'; 319 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-site-health-controller.php'; 320 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-sidebars-controller.php'; 321 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-widget-types-controller.php'; 322 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-widgets-controller.php'; 323 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-templates-controller.php'; 324 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-url-details-controller.php'; 325 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-navigation-fallback-controller.php'; 326 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-font-families-controller.php'; 327 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-font-faces-controller.php'; 328 require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-font-collections-controller.php'; 329 require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-meta-fields.php'; 330 require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-comment-meta-fields.php'; 331 require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-post-meta-fields.php'; 332 require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-term-meta-fields.php'; 333 require ABSPATH . WPINC . '/rest-api/fields/class-wp-rest-user-meta-fields.php'; 334 require ABSPATH . WPINC . '/rest-api/search/class-wp-rest-search-handler.php'; 335 require ABSPATH . WPINC . '/rest-api/search/class-wp-rest-post-search-handler.php'; 336 require ABSPATH . WPINC . '/rest-api/search/class-wp-rest-term-search-handler.php'; 337 require ABSPATH . WPINC . '/rest-api/search/class-wp-rest-post-format-search-handler.php'; 338 require ABSPATH . WPINC . '/sitemaps.php'; 339 require ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps.php'; 340 require ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-index.php'; 341 require ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-provider.php'; 342 require ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-registry.php'; 343 require ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-renderer.php'; 344 require ABSPATH . WPINC . '/sitemaps/class-wp-sitemaps-stylesheet.php'; 345 require ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-posts.php'; 346 require ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-taxonomies.php'; 347 require ABSPATH . WPINC . '/sitemaps/providers/class-wp-sitemaps-users.php'; 348 require ABSPATH . WPINC . '/class-wp-block-bindings-source.php'; 349 require ABSPATH . WPINC . '/class-wp-block-bindings-registry.php'; 350 require ABSPATH . WPINC . '/class-wp-block-editor-context.php'; 351 require ABSPATH . WPINC . '/class-wp-block-type.php'; 352 require ABSPATH . WPINC . '/class-wp-block-pattern-categories-registry.php'; 353 require ABSPATH . WPINC . '/class-wp-block-patterns-registry.php'; 354 require ABSPATH . WPINC . '/class-wp-block-styles-registry.php'; 355 require ABSPATH . WPINC . '/class-wp-block-type-registry.php'; 356 require ABSPATH . WPINC . '/class-wp-block.php'; 357 require ABSPATH . WPINC . '/class-wp-block-list.php'; 358 require ABSPATH . WPINC . '/class-wp-block-metadata-registry.php'; 359 require ABSPATH . WPINC . '/class-wp-block-parser-block.php'; 360 require ABSPATH . WPINC . '/class-wp-block-parser-frame.php'; 361 require ABSPATH . WPINC . '/class-wp-block-parser.php'; 362 require ABSPATH . WPINC . '/class-wp-classic-to-block-menu-converter.php'; 363 require ABSPATH . WPINC . '/class-wp-navigation-fallback.php'; 364 require ABSPATH . WPINC . '/block-bindings.php'; 365 require ABSPATH . WPINC . '/block-bindings/pattern-overrides.php'; 366 require ABSPATH . WPINC . '/block-bindings/post-meta.php'; 367 require ABSPATH . WPINC . '/blocks.php'; 368 require ABSPATH . WPINC . '/blocks/index.php'; 369 require ABSPATH . WPINC . '/block-editor.php'; 370 require ABSPATH . WPINC . '/block-patterns.php'; 371 require ABSPATH . WPINC . '/class-wp-block-supports.php'; 372 require ABSPATH . WPINC . '/block-supports/utils.php'; 373 require ABSPATH . WPINC . '/block-supports/align.php'; 374 require ABSPATH . WPINC . '/block-supports/custom-classname.php'; 375 require ABSPATH . WPINC . '/block-supports/generated-classname.php'; 376 require ABSPATH . WPINC . '/block-supports/settings.php'; 377 require ABSPATH . WPINC . '/block-supports/elements.php'; 378 require ABSPATH . WPINC . '/block-supports/colors.php'; 379 require ABSPATH . WPINC . '/block-supports/typography.php'; 380 require ABSPATH . WPINC . '/block-supports/border.php'; 381 require ABSPATH . WPINC . '/block-supports/layout.php'; 382 require ABSPATH . WPINC . '/block-supports/position.php'; 383 require ABSPATH . WPINC . '/block-supports/spacing.php'; 384 require ABSPATH . WPINC . '/block-supports/dimensions.php'; 385 require ABSPATH . WPINC . '/block-supports/duotone.php'; 386 require ABSPATH . WPINC . '/block-supports/shadow.php'; 387 require ABSPATH . WPINC . '/block-supports/background.php'; 388 require ABSPATH . WPINC . '/block-supports/block-style-variations.php'; 389 require ABSPATH . WPINC . '/style-engine.php'; 390 require ABSPATH . WPINC . '/style-engine/class-wp-style-engine.php'; 391 require ABSPATH . WPINC . '/style-engine/class-wp-style-engine-css-declarations.php'; 392 require ABSPATH . WPINC . '/style-engine/class-wp-style-engine-css-rule.php'; 393 require ABSPATH . WPINC . '/style-engine/class-wp-style-engine-css-rules-store.php'; 394 require ABSPATH . WPINC . '/style-engine/class-wp-style-engine-processor.php'; 395 require ABSPATH . WPINC . '/fonts/class-wp-font-face-resolver.php'; 396 require ABSPATH . WPINC . '/fonts/class-wp-font-collection.php'; 397 require ABSPATH . WPINC . '/fonts/class-wp-font-face.php'; 398 require ABSPATH . WPINC . '/fonts/class-wp-font-library.php'; 399 require ABSPATH . WPINC . '/fonts/class-wp-font-utils.php'; 400 require ABSPATH . WPINC . '/fonts.php'; 401 require ABSPATH . WPINC . '/class-wp-script-modules.php'; 402 require ABSPATH . WPINC . '/script-modules.php'; 403 require ABSPATH . WPINC . '/interactivity-api/class-wp-interactivity-api.php'; 404 require ABSPATH . WPINC . '/interactivity-api/class-wp-interactivity-api-directives-processor.php'; 405 require ABSPATH . WPINC . '/interactivity-api/interactivity-api.php'; 406 require ABSPATH . WPINC . '/class-wp-plugin-dependencies.php'; 407 408 add_action( 'after_setup_theme', array( wp_script_modules(), 'add_hooks' ) ); 409 add_action( 'after_setup_theme', array( wp_interactivity(), 'add_hooks' ) ); 410 411 /** 412 * @since 3.3.0 413 * 414 * @global WP_Embed $wp_embed WordPress Embed object. 415 */ 416 $GLOBALS['wp_embed'] = new WP_Embed(); 417 418 /** 419 * WordPress Textdomain Registry object. 420 * 421 * Used to support just-in-time translations for manually loaded text domains. 422 * 423 * @since 6.1.0 424 * 425 * @global WP_Textdomain_Registry $wp_textdomain_registry WordPress Textdomain Registry. 426 */ 427 $GLOBALS['wp_textdomain_registry'] = new WP_Textdomain_Registry(); 428 $GLOBALS['wp_textdomain_registry']->init(); 429 430 // Load multisite-specific files. 431 if ( is_multisite() ) { 432 require ABSPATH . WPINC . '/ms-functions.php'; 433 require ABSPATH . WPINC . '/ms-default-filters.php'; 434 require ABSPATH . WPINC . '/ms-deprecated.php'; 435 } 436 437 // Define constants that rely on the API to obtain the default value. 438 // Define must-use plugin directory constants, which may be overridden in the sunrise.php drop-in. 439 wp_plugin_directory_constants(); 440 441 /** 442 * @since 3.9.0 443 * 444 * @global array $wp_plugin_paths 445 */ 446 $GLOBALS['wp_plugin_paths'] = array(); 447 448 // Load must-use plugins. 449 foreach ( wp_get_mu_plugins() as $mu_plugin ) { 450 $_wp_plugin_file = $mu_plugin; 451 include_once $mu_plugin; 452 $mu_plugin = $_wp_plugin_file; // Avoid stomping of the $mu_plugin variable in a plugin. 453 454 /** 455 * Fires once a single must-use plugin has loaded. 456 * 457 * @since 5.1.0 458 * 459 * @param string $mu_plugin Full path to the plugin's main file. 460 */ 461 do_action( 'mu_plugin_loaded', $mu_plugin ); 462 } 463 unset( $mu_plugin, $_wp_plugin_file ); 464 465 // Load network activated plugins. 466 if ( is_multisite() ) { 467 foreach ( wp_get_active_network_plugins() as $network_plugin ) { 468 wp_register_plugin_realpath( $network_plugin ); 469 470 $_wp_plugin_file = $network_plugin; 471 include_once $network_plugin; 472 $network_plugin = $_wp_plugin_file; // Avoid stomping of the $network_plugin variable in a plugin. 473 474 /** 475 * Fires once a single network-activated plugin has loaded. 476 * 477 * @since 5.1.0 478 * 479 * @param string $network_plugin Full path to the plugin's main file. 480 */ 481 do_action( 'network_plugin_loaded', $network_plugin ); 482 } 483 unset( $network_plugin, $_wp_plugin_file ); 484 } 485 486 /** 487 * Fires once all must-use and network-activated plugins have loaded. 488 * 489 * @since 2.8.0 490 */ 491 do_action( 'muplugins_loaded' ); 492 493 if ( is_multisite() ) { 494 ms_cookie_constants(); 495 } 496 497 // Define constants after multisite is loaded. 498 wp_cookie_constants(); 499 500 // Define and enforce our SSL constants. 501 wp_ssl_constants(); 502 503 // Create common globals. 504 require ABSPATH . WPINC . '/vars.php'; 505 506 // Make taxonomies and posts available to plugins and themes. 507 // @plugin authors: warning: these get registered again on the init hook. 508 create_initial_taxonomies(); 509 create_initial_post_types(); 510 511 wp_start_scraping_edited_file_errors(); 512 513 // Register the default theme directory root. 514 register_theme_directory( get_theme_root() ); 515 516 if ( ! is_multisite() && wp_is_fatal_error_handler_enabled() ) { 517 // Handle users requesting a recovery mode link and initiating recovery mode. 518 wp_recovery_mode()->initialize(); 519 } 520 521 // Load active plugins. 522 foreach ( wp_get_active_and_valid_plugins() as $plugin ) { 523 wp_register_plugin_realpath( $plugin ); 524 525 $_wp_plugin_file = $plugin; 526 include_once $plugin; 527 $plugin = $_wp_plugin_file; // Avoid stomping of the $plugin variable in a plugin. 528 529 /** 530 * Fires once a single activated plugin has loaded. 531 * 532 * @since 5.1.0 533 * 534 * @param string $plugin Full path to the plugin's main file. 535 */ 536 do_action( 'plugin_loaded', $plugin ); 537 538 $plugin_data = get_plugin_data( $plugin, false, false ); 539 540 $textdomain = $plugin_data['TextDomain']; 541 if ( $textdomain ) { 542 if ( $plugin_data['DomainPath'] ) { 543 $GLOBALS['wp_textdomain_registry']->set_custom_path( $textdomain, dirname( $plugin ) . $plugin_data['DomainPath'] ); 544 } else { 545 $GLOBALS['wp_textdomain_registry']->set_custom_path( $textdomain, dirname( $plugin ) ); 546 } 547 } 548 } 549 unset( $plugin, $_wp_plugin_file, $plugin_data, $textdomain ); 550 551 // Load pluggable functions. 552 require ABSPATH . WPINC . '/pluggable.php'; 553 require ABSPATH . WPINC . '/pluggable-deprecated.php'; 554 555 // Set internal encoding. 556 wp_set_internal_encoding(); 557 558 // Run wp_cache_postload() if object cache is enabled and the function exists. 559 if ( WP_CACHE && function_exists( 'wp_cache_postload' ) ) { 560 wp_cache_postload(); 561 } 562 563 /** 564 * Fires once activated plugins have loaded. 565 * 566 * Pluggable functions are also available at this point in the loading order. 567 * 568 * @since 1.5.0 569 */ 570 do_action( 'plugins_loaded' ); 571 572 // Define constants which affect functionality if not already defined. 573 wp_functionality_constants(); 574 575 // Add magic quotes and set up $_REQUEST ( $_GET + $_POST ). 576 wp_magic_quotes(); 577 578 /** 579 * Fires when comment cookies are sanitized. 580 * 581 * @since 2.0.11 582 */ 583 do_action( 'sanitize_comment_cookies' ); 584 585 /** 586 * WordPress Query object 587 * 588 * @since 2.0.0 589 * 590 * @global WP_Query $wp_the_query WordPress Query object. 591 */ 592 $GLOBALS['wp_the_query'] = new WP_Query(); 593 594 /** 595 * Holds the reference to {@see $wp_the_query}. 596 * Use this global for WordPress queries 597 * 598 * @since 1.5.0 599 * 600 * @global WP_Query $wp_query WordPress Query object. 601 */ 602 $GLOBALS['wp_query'] = $GLOBALS['wp_the_query']; 603 604 /** 605 * Holds the WordPress Rewrite object for creating pretty URLs 606 * 607 * @since 1.5.0 608 * 609 * @global WP_Rewrite $wp_rewrite WordPress rewrite component. 610 */ 611 $GLOBALS['wp_rewrite'] = new WP_Rewrite(); 612 613 /** 614 * WordPress Object 615 * 616 * @since 2.0.0 617 * 618 * @global WP $wp Current WordPress environment instance. 619 */ 620 $GLOBALS['wp'] = new WP(); 621 622 /** 623 * WordPress Widget Factory Object 624 * 625 * @since 2.8.0 626 * 627 * @global WP_Widget_Factory $wp_widget_factory 628 */ 629 $GLOBALS['wp_widget_factory'] = new WP_Widget_Factory(); 630 631 /** 632 * WordPress User Roles 633 * 634 * @since 2.0.0 635 * 636 * @global WP_Roles $wp_roles WordPress role management object. 637 */ 638 $GLOBALS['wp_roles'] = new WP_Roles(); 639 640 /** 641 * Fires before the theme is loaded. 642 * 643 * @since 2.6.0 644 */ 645 do_action( 'setup_theme' ); 646 647 // Define the template related constants and globals. 648 wp_templating_constants(); 649 wp_set_template_globals(); 650 651 // Load the default text localization domain. 652 load_default_textdomain(); 653 654 $locale = get_locale(); 655 $locale_file = WP_LANG_DIR . "/$locale.php"; 656 if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) ) { 657 require $locale_file; 658 } 659 unset( $locale_file ); 660 661 /** 662 * WordPress Locale object for loading locale domain date and various strings. 663 * 664 * @since 2.1.0 665 * 666 * @global WP_Locale $wp_locale WordPress date and time locale object. 667 */ 668 $GLOBALS['wp_locale'] = new WP_Locale(); 669 670 /** 671 * WordPress Locale Switcher object for switching locales. 672 * 673 * @since 4.7.0 674 * 675 * @global WP_Locale_Switcher $wp_locale_switcher WordPress locale switcher object. 676 */ 677 $GLOBALS['wp_locale_switcher'] = new WP_Locale_Switcher(); 678 $GLOBALS['wp_locale_switcher']->init(); 679 680 // Load the functions for the active theme, for both parent and child theme if applicable. 681 foreach ( wp_get_active_and_valid_themes() as $theme ) { 682 $wp_theme = wp_get_theme( basename( $theme ) ); 683 684 if ( file_exists( $theme . '/functions.php' ) ) { 685 include $theme . '/functions.php'; 686 } 687 688 $wp_theme->load_textdomain(); 689 } 690 unset( $theme, $wp_theme ); 691 692 /** 693 * Fires after the theme is loaded. 694 * 695 * @since 3.0.0 696 */ 697 do_action( 'after_setup_theme' ); 698 699 // Create an instance of WP_Site_Health so that Cron events may fire. 700 if ( ! class_exists( 'WP_Site_Health' ) ) { 701 require_once ABSPATH . 'wp-admin/includes/class-wp-site-health.php'; 702 } 703 WP_Site_Health::get_instance(); 704 705 // Set up current user. 706 $GLOBALS['wp']->init(); 707 708 /** 709 * Fires after WordPress has finished loading but before any headers are sent. 710 * 711 * Most of WP is loaded at this stage, and the user is authenticated. WP continues 712 * to load on the {@see 'init'} hook that follows (e.g. widgets), and many plugins instantiate 713 * themselves on it for all sorts of reasons (e.g. they need a user, a taxonomy, etc.). 714 * 715 * If you wish to plug an action once WP is loaded, use the {@see 'wp_loaded'} hook below. 716 * 717 * @since 1.5.0 718 */ 719 do_action( 'init' ); 720 721 // Check site status. 722 if ( is_multisite() ) { 723 $file = ms_site_check(); 724 if ( true !== $file ) { 725 require $file; 726 die(); 727 } 728 unset( $file ); 729 } 730 731 /** 732 * This hook is fired once WP, all plugins, and the theme are fully loaded and instantiated. 733 * 734 * Ajax requests should use wp-admin/admin-ajax.php. admin-ajax.php can handle requests for 735 * users not logged in. 736 * 737 * @link https://developer.wordpress.org/plugins/javascript/ajax 738 * 739 * @since 3.0.0 740 */ 741 do_action( 'wp_loaded' );
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated : Thu Dec 5 08:20:01 2024 | Cross-referenced by PHPXref |