[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

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

These functions are needed to load WordPress.

File Size: 1555 lines (43 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 11 files
 wp-includes/wp-db.php
 wp-includes/pluggable.php
 wp-includes/kses.php
 wp-includes/plugin.php
 wp-includes/cache.php
 wp-includes/class-wp-locale.php
 wp-includes/functions.php
 wp-includes/class-wp-locale-switcher.php
 wp-includes/pomo/mo.php
 wp-includes/version.php
 wp-includes/l10n.php

Defines 49 functions

  wp_get_server_protocol()
  wp_unregister_GLOBALS()
  wp_fix_server_vars()
  wp_check_php_mysql_versions()
  wp_favicon_request()
  wp_maintenance()
  timer_start()
  timer_stop()
  wp_debug_mode()
  wp_set_lang_dir()
  require_wp_db()
  wp_set_wpdb_vars()
  wp_using_ext_object_cache()
  wp_start_object_cache()
  wp_not_installed()
  wp_get_mu_plugins()
  wp_get_active_and_valid_plugins()
  wp_skip_paused_plugins()
  wp_get_active_and_valid_themes()
  wp_skip_paused_themes()
  wp_is_recovery_mode()
  is_protected_endpoint()
  is_protected_ajax_action()
  wp_set_internal_encoding()
  wp_magic_quotes()
  shutdown_action_hook()
  wp_clone()
  is_admin()
  is_blog_admin()
  is_network_admin()
  is_user_admin()
  is_multisite()
  get_current_blog_id()
  get_current_network_id()
  wp_load_translations_early()
  wp_installing()
  is_ssl()
  wp_convert_hr_to_bytes()
  wp_is_ini_value_changeable()
  wp_doing_ajax()
  wp_using_themes()
  wp_doing_cron()
  is_wp_error()
  wp_is_file_mod_allowed()
  wp_start_scraping_edited_file_errors()
  wp_finalize_scraping_edited_file_errors()
  wp_is_json_request()
  wp_is_jsonp_request()
  wp_is_xml_request()

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.

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.

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

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

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_skip_paused_plugins( array $plugins )   X-Ref
Filters a given list of plugins, removing any paused plugins from it.

return: array Filtered value of $plugins, without any paused plugins.
param: array $plugins List of absolute plugin main file paths.

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: array Array of paths to theme directories.

wp_skip_paused_themes( array $themes )   X-Ref
Filters a given list of themes, removing any paused themes from it.

return: array Filtered value of $themes, without any paused themes.
param: array $themes List of absolute theme directory paths.

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

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.

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.

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.

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

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.

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.

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

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.

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.

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

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.

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_using_themes()   X-Ref
Determines whether the current request should use themes.

return: bool True if themes should be used, 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.

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

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.

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.

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.

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



Generated: Fri Sep 20 08:20:02 2019 Cross-referenced by PHPXref 0.7