Skip to main content
We are Brand SEO Beijing serving international business, your marketing partner, Contact us by mi@mgsh.com.cn

Website CMS source code interpretation (3)

Map: index.php->……->wp-setting.php->wp-includes/load.php
|_wp-includes/default-constants.php
|_wp-includes/version.php

wp-includes/load.php:

Description: Defines the functions required to load WP.
1) wp_unregister_GLOBALS(), close the global registration variables other than 'GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix'.
2) wp_fix_server_vars(), prepare $_SERVER variables for various installation methods (for example, in different environments such as IIS, Apache, etc.).
3) wp_check_php_mysql_versions(), check PHP version, MYSQL extension and database drop-in.
4) wp_maintenance(), check whether the WP is in maintenance mode (such as the upgrade process), if the conditions are met, terminate the program and generate a maintenance message.
5) timer_start(), the standard system time capture method in PHP4.
6) timer_stop( $display = 0, $precision = 3 ), returns the time, and outputs the time when $display = 1.
7) wp_debug_mode(), set the error handling mode of PHP and the debugging mode of WP.
8) wp_set_lang_dir(), set the constant WP_LANG_DIR, which is the folder where the language file is located.
9) wp_set_wpdb_vars(), set the database table prefix and the format specifier of the database table column.
10) wp_start_object_cache(), open the object cache.If the object-cache.php file exists in the wp-content folder, it is used as the extended object cache.
11) wp_not_installed(), if WP is not installed, start the installer.
12) wp_get_mu_plugins(), returns the file array of must-use plugins, the default must-use plugins are in the wp-content/mu-plugins directory, if you want to modify the default directory, you can configure WPMU_PLUGIN_DIR and WPMU_PLUGIN_URL in the wp-config.php file constant.
13) wp_get_active_and_valid_plugins(), returns an array of activated valid plugin files, the default plugin is in the wp-content/plugins directory, if you want to modify the default directory, you can configure the WP_PLUGIN_DIR and WP_PLUGIN_URL constants in the wp-config.php file.
14) wp_set_internal_encoding(), use the mb_internal_encoding() function to set the internal encoding method, the default setting is UTF-8.
15) wp_magic_quotes(), add magic quotes to $_GET, $_POST, $_COOKIE, and $_SERVER.
16) shutdown_action_hook(), triggers the mount point do_action('shutdown' ), which runs before PHP shuts down execution.
17) wp_clone( $object ), clone the object.The clone can only be successful in versions above PHP5, otherwise the original object will be returned.
18) is_admin(), returns whether the current request is in the WP's admin panel.
19) is_multisite(), returns whether multisite is supported.

wp-includes/default-constants.php:

Description: Defines constants and global variables that can be overridden, they can usually be reconfigured in wp-config.php.
1) wp_initial_constants( ), define WP initialization constants WP_MEMORY_LIMIT, WP_CONTENT_DIR, WP_DEBUG, WP_DEBUG_DISPLAY, WP_DEBUG_LOG, WP_CACHE, MEDIA_TRASH, SHORTINIT and global variable $blog_id (used to set multi-blog).
2) wp_plugin_directory_constants( ), defines the constants WP_CONTENT_URL, WP_PLUGIN_DIR, WP_PLUGIN_URL, WPMU_PLUGIN_DIR, WPMU_PLUGIN_URL of the WP plugin folder.
3) wp_cookie_constants( ), defines WP cookie-related constants COOKIEHASH, USER_COOKIE, PASS_COOKIE, AUTH_COOKIE, SECURE_AUTH_COOKIE, LOGGED_IN_COOKIE, TEST_COOKIE, COOKIEPATH, SITECOOKIEPATH, ADMIN_COOKIE_PATH, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN.
4) wp_ssl_constants( ), define the constants FORCE_SSL_ADMIN and FORCE_SSL_LOGIN related to WP and ssl.
5) wp_functionality_constants( ), define WP function-related constants AUTOSAVE_INTERVAL, EMPTY_TRASH_DAYS, WP_POST_REVISIONS.
6) wp_templating_constants( ), defines WP template-related constants TEMPLATEPATH, STYLESHEETPATH, WP_DEFAULT_THEME.

 

wp-includes/version.php:

Description: Define version related variables, including $wp_version, $wp_db_version, $tinymce_version, manifest_version, $required_php_version, $required_mysql_version 
Source of this article: www.cnblogs.com/vicenteforever/category/224217.html

Back to Top