Exemplo n.º 1
0
function wp_debug_mode()
{
    if (\WP_CLI::get_config('debug')) {
        if (!defined('WP_DEBUG')) {
            define('WP_DEBUG', true);
        }
        error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
    } else {
        \wp_debug_mode();
    }
    // XDebug already sends errors to STDERR
    ini_set('display_errors', function_exists('xdebug_debug_zval') ? false : 'STDERR');
}
Exemplo n.º 2
0
@ini_set('magic_quotes_runtime', 0);
@ini_set('magic_quotes_sybase', 0);
// WordPress calculates offsets from UTC.
date_default_timezone_set('UTC');
// Turn register_globals off.
wp_unregister_GLOBALS();
// Standardize $_SERVER variables across setups.
wp_fix_server_vars();
// Check if we have received a request due to missing favicon.ico
wp_favicon_request();
// Check if we're in maintenance mode.
wp_maintenance();
// Start loading timer.
timer_start();
// Check if we're in WP_DEBUG mode.
wp_debug_mode();
// For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
if (WP_CACHE) {
    WP_DEBUG ? include WP_CONTENT_DIR . '/advanced-cache.php' : @(include WP_CONTENT_DIR . '/advanced-cache.php');
}
// Define WP_LANG_DIR if not set.
wp_set_lang_dir();
// Load early WordPress files.
require ABSPATH . WPINC . '/compat.php';
require ABSPATH . WPINC . '/functions.php';
require ABSPATH . WPINC . '/class-wp.php';
require ABSPATH . WPINC . '/class-wp-error.php';
require ABSPATH . WPINC . '/plugin.php';
require ABSPATH . WPINC . '/pomo/mo.php';
// Include the wpdb class and, if present, a db.php database drop-in.
require_wp_db();