[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)




/wp-includes/ -> load.php (summary)

These functions are needed to load WordPress.

File Size: 1273 lines (36 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 10 files

Defines 40 functions


Functions that are not part of a class:

wp_get_server_protocol()   X-Ref
Return the HTTP protocol sent by the server.

return: string The HTTP protocol. Default: HTTP/1.0.

wp_unregister_GLOBALS()   X-Ref
Turn register globals off.

wp_fix_server_vars()   X-Ref
Fix `$_SERVER` variables for various setups.

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.

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.

wp_maintenance()   X-Ref
Die with a maintenance message when conditions are met.

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
enters maintenance mode and displays a message.

The default message can be replaced by using a drop-in (maintenance.php in
the wp-content directory).

timer_start()   X-Ref
Start the WordPress micro-timer.

return: bool Always returns true.

timer_stop( $display = 0, $precision = 3 )   X-Ref
Retrieve or display the time from the page start to when function is called.

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.
return: string The "second.microsecond" finished time calculation. The number is formatted

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

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 debug.log in the content

Errors are never displayed for XML-RPC, REST, and Ajax requests.

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`.

require_wp_db()   X-Ref
Load the database class file and instantiate the `$wpdb` global.

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`.

wp_using_ext_object_cache( $using = null )   X-Ref
Toggle `$_wp_using_ext_object_cache` on and off without directly
touching global.

param: bool $using Whether external object cache is being used.
return: bool The current 'using' setting.

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.

wp_not_installed()   X-Ref
Redirect to the installer if WordPress is not installed.

Dies with an error message when Multisite is enabled.

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: array Files to include.

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[] $plugin_file Array of paths to plugin files relative to the plugins directory.

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.

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.

shutdown_action_hook()   X-Ref
Runs just before PHP shuts down execution.

wp_clone( $object )   X-Ref
Copy an object.

param: object $object The object to clone.
return: object The cloned object.

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.

is_blog_admin()   X-Ref
Whether the current request is for a site's admininstrative 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.

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.

return: bool True if inside WordPress network administration pages.

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.

is_multisite()   X-Ref
If Multisite is enabled.

return: bool True if Multisite is enabled, false otherwise.

get_current_blog_id()   X-Ref
Retrieve the current site ID.

return: int Site ID.

get_current_network_id()   X-Ref
Retrieves the current network ID.

return: int The ID of the current network.

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.

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`.

param: bool $is_installing Optional. True to set WP into Installing mode, false to turn Installing mode off.
return: bool True if WP is installing, otherwise false. When a `$is_installing` is passed, the function will

is_ssl()   X-Ref
Determines if SSL is used.

return: bool True if SSL, otherwise false.

wp_convert_hr_to_bytes( $value )   X-Ref
Converts a shorthand byte value to an integer byte value.

param: string $value A (PHP ini) byte value, either shorthand or ordinary.
return: int An integer byte value.

wp_is_ini_value_changeable( $setting )   X-Ref
Determines whether a PHP ini value is changeable at runtime.

param: string $setting The name of the ini setting to check.
return: bool True if the value is changeable at runtime. False otherwise.

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.

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.

is_wp_error( $thing )   X-Ref
Check whether variable is a WordPress Error.

Returns true if $thing is an object of the WP_Error class.

param: mixed $thing Check if unknown variable is a WP_Error object.
return: bool True, if WP_Error. False, if not WP_Error.

wp_is_file_mod_allowed( $context )   X-Ref
Determines whether file modifications are allowed.

param: string $context The usage context.
return: bool True if file modification is allowed, false otherwise.

wp_start_scraping_edited_file_errors()   X-Ref
Start scraping edited file errors.

wp_finalize_scraping_edited_file_errors( $scrape_key )   X-Ref
Finalize scraping for edited file errors.

param: string $scrape_key Scrape key.

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, false otherwise.

Generated: Fri Dec 14 08:20:01 2018 Cross-referenced by PHPXref 0.7