Last active
December 21, 2015 01:08
-
-
Save tonykwon/6225163 to your computer and use it in GitHub Desktop.
WP_DEBUG tweaks - wp-config.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* For developers: WordPress debugging mode. | |
* | |
* Change this to true to enable the display of notices during development. | |
* It is strongly recommended that plugin and theme developers use WP_DEBUG | |
* in their development environments. | |
*/ | |
define('WP_DEBUG', false); | |
if ( $_SERVER['HTTP_HOST'] == 'master.localhost') { | |
// slightly modifying wp_debug_mode() function of wp-includes/load.php | |
// | |
define('WP_DEBUG_DISPLAY', true); | |
define('WP_DEBUG_LOG', false); | |
// go easy with Strict warnings | |
error_reporting( E_ALL & E_WARNING & ~E_STRICT ); | |
if ( WP_DEBUG_DISPLAY ) { | |
ini_set( 'display_errors', 1 ); | |
} elseif ( null !== WP_DEBUG_DISPLAY ) { | |
ini_set( 'display_errors', 0 ); | |
} | |
if ( WP_DEBUG_LOG ) { | |
ini_set( 'log_errors', 1 ); | |
ini_set( 'error_log', ABSPATH . 'wp-content' . '/debug.log' ); | |
} | |
if ( defined( 'XMLRPC_REQUEST' ) ) { | |
ini_set( 'display_errors', 0 ); | |
} | |
} // if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment