本文整理匯總了PHP中wp_debug_mode函數的典型用法代碼示例。如果您正苦於以下問題:PHP wp_debug_mode函數的具體用法?PHP wp_debug_mode怎麽用?PHP wp_debug_mode使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了wp_debug_mode函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: wp_debug_mode
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');
}
示例2: date_default_timezone_set
@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();