[ XREF Home ] [ Index ]

PHP Cross Reference of WordPress Trunk

Provided by Yoast

title

Body

[close]

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

These functions are needed to load WordPress.

File Size: 650 lines (21 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 24 functions

  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_start_object_cache()
  wp_not_installed()
  wp_get_mu_plugins()
  wp_get_active_and_valid_plugins()
  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()

Functions
Functions that are not part of a class:

wp_unregister_GLOBALS()   X-Ref
Turn register globals off.

return: null Will return null if register_globals PHP directive was disabled

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
Dies 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
PHP 4 standard microtime start capture.

return: bool Always returns true.

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

You can get the results and print them by doing:
<code>
$nTimePageTookToExecute = timer_stop();
echo $nTimePageTookToExecute;
</code>

Or instead, you can do:
<code>
timer_stop(1);
</code>
which will do what the above does. If you need the result, you can assign it to a variable, but
most cases, you only need to echo it.

param: int $display Use '0' or null to not echo anything and 1 to echo the total time
param: int $precision The amount of digits from the right of the decimal to display. Default is 3.
return: float The "second.microsecond" finished time calculation

wp_debug_mode()   X-Ref
Sets PHP error handling and handles WordPress debug mode.

Uses three constants: WP_DEBUG, WP_DEBUG_DISPLAY, and WP_DEBUG_LOG. All three can be
defined in wp-config.php. Example: <code> define( 'WP_DEBUG', true ); </code>

WP_DEBUG_DISPLAY and WP_DEBUG_LOG perform no function unless WP_DEBUG is true.
WP_DEBUG defaults to false.

When WP_DEBUG is true, all PHP notices are reported. WordPress will also display
notices, including one 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.

When WP_DEBUG_DISPLAY is true, WordPress will force errors to be displayed.
WP_DEBUG_DISPLAY defaults to true. Defining it as false prevents WordPress from
changing the global configuration setting. (Defining WP_DEBUG_DISPLAY as false
will never force errors to be hidden.)

When WP_DEBUG_LOG is true, errors will be logged to wp-content/debug.log.
WP_DEBUG_LOG defaults to false.


wp_set_lang_dir()   X-Ref
Sets the location of the language directory.

To set directory manually, define <code>WP_LANG_DIR</code> in wp-config.php.

If the language directory exists within WP_CONTENT_DIR that is used
Otherwise if the language directory exists within WPINC, that's used
Finally, If neither of the preceeding directories is found,
WP_CONTENT_DIR/languages is used.

The WP_LANG_DIR constant was introduced in 2.1.0.


require_wp_db()   X-Ref
Load the correct database class file.

This function is used to load the database class file either at runtime or by
wp-admin/setup-config.php. We must globalize $wpdb to ensure that it is
defined globally by the inline code in wp-db.php.


wp_set_wpdb_vars()   X-Ref
Sets the database table prefix and the format specifiers for database table columns.

Columns not listed here default to %s.


wp_start_object_cache()   X-Ref
Starts 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
Redirects to the installer if WordPress is not installed.

Dies with an error message when multisite is enabled.


wp_get_mu_plugins()   X-Ref
Returns array of must-use plugin files to be included in global scope.

The default directory is wp-content/mu-plugins. To change the default directory
manually, define <code>WPMU_PLUGIN_DIR</code> and <code>WPMU_PLUGIN_URL</code>
in wp-config.php.

return: array Files to include

wp_get_active_and_valid_plugins()   X-Ref
Returns array of plugin files to be included in global scope.

The default directory is wp-content/plugins. To change the default directory
manually, define <code>WP_PLUGIN_DIR</code> and <code>WP_PLUGIN_URL</code>
in wp-config.php.

return: array Files to include

wp_set_internal_encoding()   X-Ref
Sets internal encoding using mb_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
Whether the current request is for a network or blog admin page

Does not inform on whether the user is an admin! Use capability checks to
tell if the user should be accessing a section or not.

return: bool True if inside WordPress administration pages.

is_blog_admin()   X-Ref
Whether the current request is for a blog admin screen /wp-admin/

Does not inform on whether the user is a blog admin! Use capability checks to
tell if the user should be accessing a section or not.

return: bool True if inside WordPress network administration pages.

is_network_admin()   X-Ref
Whether the current request is for a network admin screen /wp-admin/network/

Does not inform on whether the user is a network admin! Use capability checks to
tell if the user should be accessing a section or not.

return: bool True if inside WordPress network administration pages.

is_user_admin()   X-Ref
Whether the current request is for a user admin screen /wp-admin/user/

Does not inform on whether the user is an admin! Use capability checks to
tell if the user should be accessing a section or not.

return: bool True if inside WordPress user administration pages.

is_multisite()   X-Ref
Whether Multisite support is enabled

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



Generated: Wed Jun 1 08:30:02 2011 Cross-referenced by PHPXref 0.7
Provided by Yoast and awesome WordPress Hosting