[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
These functions are needed to load WordPress.
File Size: | 1781 lines (50 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 12 files wp-includes/pomo/mo.php wp-includes/cache.php wp-includes/plugin.php wp-includes/wp-db.php wp-includes/l10n.php wp-includes/class-wp-locale.php wp-includes/functions.php wp-includes/cache-compat.php wp-includes/kses.php wp-includes/pluggable.php wp-includes/version.php wp-includes/class-wp-locale-switcher.php |
wp_get_server_protocol() X-Ref |
Return the HTTP protocol sent by the server. return: string The HTTP protocol. Default: HTTP/1.0. since: 4.4.0 |
wp_fix_server_vars() X-Ref |
Fix `$_SERVER` variables for various setups. since: 3.0.0 |
wp_populate_basic_auth_from_authorization_header() X-Ref |
Populates the Basic Auth server details from the Authorization header. Some servers running in CGI or FastCGI mode don't pass the Authorization header on to WordPress. If it's been rewritten to the `HTTP_AUTHORIZATION` header, fill in the proper $_SERVER variables instead. since: 5.6.0 |
wp_check_php_mysql_versions() X-Ref |
Check for the required PHP version, and the MySQL extension or a database drop-in. Dies if requirements are not met. since: 3.0.0 |
wp_get_environment_type() X-Ref |
Retrieves the current environment type. The type can be set via the `WP_ENVIRONMENT_TYPE` global system variable, or a constant of the same name. Possible values are 'local', 'development', 'staging', and 'production'. If not set, the type defaults to 'production'. return: string The current environment type. since: 5.5.0 since: 5.5.1 Added the 'local' type. since: 5.5.1 Removed the ability to alter the list of types. |
wp_favicon_request() X-Ref |
Don't load all of WordPress when handling a favicon.ico request. Instead, send the headers for a zero-length favicon and bail. since: 3.0.0 |
wp_maintenance() X-Ref |
Die with a maintenance message when conditions are met. The default message can be replaced by using a drop-in (maintenance.php in the wp-content directory). since: 3.0.0 |
wp_is_maintenance_mode() X-Ref |
Check if maintenance mode is enabled. Checks for a file in the WordPress root directory named ".maintenance". This file will contain the variable $upgrading, set to the time the file was created. If the file was created less than 10 minutes ago, WordPress is in maintenance mode. return: bool True if maintenance mode is enabled, false otherwise. since: 5.5.0 |
timer_float() X-Ref |
Get the time elapsed so far during this PHP script. Uses REQUEST_TIME_FLOAT that appeared in PHP 5.4.0. return: float Seconds since the PHP script started. since: 5.8.0 |
timer_start() X-Ref |
Start the WordPress micro-timer. return: bool Always returns true. since: 0.71 |
timer_stop( $display = 0, $precision = 3 ) X-Ref |
Retrieve or display the time from the page start to when function is called. return: string The "second.microsecond" finished time calculation. The number is formatted param: int|bool $display Whether to echo or return the results. Accepts 0|false for return, param: int $precision The number of digits from the right of the decimal to display. since: 0.71 |
wp_debug_mode() X-Ref |
Set PHP error reporting based on WordPress debug settings. Uses three constants: `WP_DEBUG`, `WP_DEBUG_DISPLAY`, and `WP_DEBUG_LOG`. All three can be defined in wp-config.php. By default, `WP_DEBUG` and `WP_DEBUG_LOG` are set to false, and `WP_DEBUG_DISPLAY` is set to true. When `WP_DEBUG` is true, all PHP notices are reported. WordPress will also display internal notices: when a deprecated WordPress function, function argument, or file is used. Deprecated code may be removed from a later version. It is strongly recommended that plugin and theme developers use `WP_DEBUG` in their development environments. `WP_DEBUG_DISPLAY` and `WP_DEBUG_LOG` perform no function unless `WP_DEBUG` is true. When `WP_DEBUG_DISPLAY` is true, WordPress will force errors to be displayed. `WP_DEBUG_DISPLAY` defaults to true. Defining it as null prevents WordPress from changing the global configuration setting. Defining `WP_DEBUG_DISPLAY` as false will force errors to be hidden. When `WP_DEBUG_LOG` is true, errors will be logged to `wp-content/debug.log`. When `WP_DEBUG_LOG` is a valid path, errors will be logged to the specified file. Errors are never displayed for XML-RPC, REST, `ms-files.php`, and Ajax requests. since: 3.0.0 since: 5.1.0 `WP_DEBUG_LOG` can be a file path. |
wp_set_lang_dir() X-Ref |
Set the location of the language directory. To set directory manually, define the `WP_LANG_DIR` constant in wp-config.php. If the language directory exists within `WP_CONTENT_DIR`, it is used. Otherwise the language directory is assumed to live in `WPINC`. since: 3.0.0 |
require_wp_db() X-Ref |
Load the database class file and instantiate the `$wpdb` global. since: 2.5.0 |
wp_set_wpdb_vars() X-Ref |
Set the database table prefix and the format specifiers for database table columns. Columns not listed here default to `%s`. since: 3.0.0 |
wp_using_ext_object_cache( $using = null ) X-Ref |
Toggle `$_wp_using_ext_object_cache` on and off without directly touching global. return: bool The current 'using' setting. param: bool $using Whether external object cache is being used. since: 3.7.0 |
wp_start_object_cache() X-Ref |
Start the WordPress object cache. If an object-cache.php file exists in the wp-content directory, it uses that drop-in as an external object cache. since: 3.0.0 |
wp_not_installed() X-Ref |
Redirect to the installer if WordPress is not installed. Dies with an error message when Multisite is enabled. since: 3.0.0 |
wp_get_mu_plugins() X-Ref |
Retrieve an array of must-use plugin files. The default directory is wp-content/mu-plugins. To change the default directory manually, define `WPMU_PLUGIN_DIR` and `WPMU_PLUGIN_URL` in wp-config.php. return: string[] Array of absolute paths of files to include. since: 3.0.0 |
wp_get_active_and_valid_plugins() X-Ref |
Retrieve an array of active and valid plugin files. While upgrading or installing WordPress, no plugins are returned. The default directory is `wp-content/plugins`. To change the default directory manually, define `WP_PLUGIN_DIR` and `WP_PLUGIN_URL` in `wp-config.php`. return: string[] Array of paths to plugin files relative to the plugins directory. since: 3.0.0 |
wp_skip_paused_plugins( array $plugins ) X-Ref |
Filters a given list of plugins, removing any paused plugins from it. return: string[] Filtered array of plugins, without any paused plugins. param: string[] $plugins Array of absolute plugin main file paths. since: 5.2.0 |
wp_get_active_and_valid_themes() X-Ref |
Retrieves an array of active and valid themes. While upgrading or installing WordPress, no themes are returned. return: string[] Array of absolute paths to theme directories. since: 5.1.0 |
wp_skip_paused_themes( array $themes ) X-Ref |
Filters a given list of themes, removing any paused themes from it. return: string[] Filtered array of absolute paths to themes, without any paused themes. param: string[] $themes Array of absolute theme directory paths. since: 5.2.0 |
wp_is_recovery_mode() X-Ref |
Is WordPress in Recovery Mode. In this mode, plugins or themes that cause WSODs will be paused. return: bool since: 5.2.0 |
is_protected_endpoint() X-Ref |
Determines whether we are currently on an endpoint that should be protected against WSODs. return: bool True if the current endpoint should be protected. since: 5.2.0 |
is_protected_ajax_action() X-Ref |
Determines whether we are currently handling an Ajax action that should be protected against WSODs. return: bool True if the current Ajax action should be protected. since: 5.2.0 |
wp_set_internal_encoding() X-Ref |
Set internal encoding. In most cases the default internal encoding is latin1, which is of no use, since we want to use the `mb_` functions for `utf-8` strings. since: 3.0.0 |
wp_magic_quotes() X-Ref |
Add magic quotes to `$_GET`, `$_POST`, `$_COOKIE`, and `$_SERVER`. Also forces `$_REQUEST` to be `$_GET + $_POST`. If `$_SERVER`, `$_COOKIE`, or `$_ENV` are needed, use those superglobals directly. since: 3.0.0 |
shutdown_action_hook() X-Ref |
Runs just before PHP shuts down execution. since: 1.2.0 |
wp_clone( $object ) X-Ref |
Copy an object. return: object The cloned object. param: object $object The object to clone. since: 2.7.0 |
is_admin() X-Ref |
Determines whether the current request is for an administrative interface page. Does not check if the user is an administrator; use current_user_can() for checking roles and capabilities. For more information on this and similar theme functions, check out the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ Conditional Tags} article in the Theme Developer Handbook. return: bool True if inside WordPress administration interface, false otherwise. since: 1.5.1 |
is_blog_admin() X-Ref |
Whether the current request is for a site's administrative interface. e.g. `/wp-admin/` Does not check if the user is an administrator; use current_user_can() for checking roles and capabilities. return: bool True if inside WordPress blog administration pages. since: 3.1.0 |
is_network_admin() X-Ref |
Whether the current request is for the network administrative interface. e.g. `/wp-admin/network/` Does not check if the user is an administrator; use current_user_can() for checking roles and capabilities. Does not check if the site is a Multisite network; use is_multisite() for checking if Multisite is enabled. return: bool True if inside WordPress network administration pages. since: 3.1.0 |
is_user_admin() X-Ref |
Whether the current request is for a user admin screen. e.g. `/wp-admin/user/` Does not check if the user is an administrator; use current_user_can() for checking roles and capabilities. return: bool True if inside WordPress user administration pages. since: 3.1.0 |
is_multisite() X-Ref |
If Multisite is enabled. return: bool True if Multisite is enabled, false otherwise. since: 3.0.0 |
get_current_blog_id() X-Ref |
Retrieve the current site ID. return: int Site ID. since: 3.1.0 |
get_current_network_id() X-Ref |
Retrieves the current network ID. return: int The ID of the current network. since: 4.6.0 |
wp_load_translations_early() X-Ref |
Attempt an early load of translations. Used for errors encountered during the initial loading process, before the locale has been properly detected and loaded. Designed for unusual load sequences (like setup-config.php) or for when the script will then terminate with an error, otherwise there is a risk that a file can be double-included. since: 3.4.0 |
wp_installing( $is_installing = null ) X-Ref |
Check or set whether WordPress is in "installation" mode. If the `WP_INSTALLING` constant is defined during the bootstrap, `wp_installing()` will default to `true`. return: bool True if WP is installing, otherwise false. When a `$is_installing` is passed, the function will param: bool $is_installing Optional. True to set WP into Installing mode, false to turn Installing mode off. since: 4.4.0 |
is_ssl() X-Ref |
Determines if SSL is used. return: bool True if SSL, otherwise false. since: 2.6.0 since: 4.6.0 Moved from functions.php to load.php. |
wp_convert_hr_to_bytes( $value ) X-Ref |
Converts a shorthand byte value to an integer byte value. return: int An integer byte value. param: string $value A (PHP ini) byte value, either shorthand or ordinary. since: 2.3.0 since: 4.6.0 Moved from media.php to load.php. |
wp_is_ini_value_changeable( $setting ) X-Ref |
Determines whether a PHP ini value is changeable at runtime. return: bool True if the value is changeable at runtime. False otherwise. param: string $setting The name of the ini setting to check. since: 4.6.0 |
wp_doing_ajax() X-Ref |
Determines whether the current request is a WordPress Ajax request. return: bool True if it's a WordPress Ajax request, false otherwise. since: 4.7.0 |
wp_using_themes() X-Ref |
Determines whether the current request should use themes. return: bool True if themes should be used, false otherwise. since: 5.1.0 |
wp_doing_cron() X-Ref |
Determines whether the current request is a WordPress cron request. return: bool True if it's a WordPress cron request, false otherwise. since: 4.8.0 |
is_wp_error( $thing ) X-Ref |
Checks whether the given variable is a WordPress Error. Returns whether `$thing` is an instance of the `WP_Error` class. return: bool Whether the variable is an instance of WP_Error. param: mixed $thing The variable to check. since: 2.1.0 |
wp_is_file_mod_allowed( $context ) X-Ref |
Determines whether file modifications are allowed. return: bool True if file modification is allowed, false otherwise. param: string $context The usage context. since: 4.8.0 |
wp_start_scraping_edited_file_errors() X-Ref |
Start scraping edited file errors. since: 4.9.0 |
wp_finalize_scraping_edited_file_errors( $scrape_key ) X-Ref |
Finalize scraping for edited file errors. param: string $scrape_key Scrape key. since: 4.9.0 |
wp_is_json_request() X-Ref |
Checks whether current request is a JSON request, or is expecting a JSON response. return: bool True if `Accepts` or `Content-Type` headers contain `application/json`. since: 5.0.0 |
wp_is_jsonp_request() X-Ref |
Checks whether current request is a JSONP request, or is expecting a JSONP response. return: bool True if JSONP request, false otherwise. since: 5.2.0 |
wp_is_json_media_type( $media_type ) X-Ref |
Checks whether a string is a valid JSON Media Type. return: bool True if string is a valid JSON Media Type. param: string $media_type A Media Type string to check. since: 5.6.0 |
wp_is_xml_request() X-Ref |
Checks whether current request is an XML request, or is expecting an XML response. return: bool True if `Accepts` or `Content-Type` headers contain `text/xml` since: 5.2.0 |
wp_is_site_protected_by_basic_auth( $context = '' ) X-Ref |
Checks if this site is protected by HTTP Basic Auth. At the moment, this merely checks for the present of Basic Auth credentials. Therefore, calling this function with a context different from the current context may give inaccurate results. In a future release, this evaluation may be made more robust. Currently, this is only used by Application Passwords to prevent a conflict since it also utilizes Basic Auth. return: bool Whether the site is protected by Basic Auth. param: string $context The context to check for protection. Accepts 'login', 'admin', and 'front'. since: 5.6.1 |
Generated: Thu Nov 21 01:00:03 2024 | Cross-referenced by PHPXref 0.7.1 |