Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wp_debug_mode() {
- if ( WP_DEBUG ) {
- if ( is_defined( 'WP_DEBUG_LEVEL' ) ) {
- error_reporting( WP_DEBUG_LEVEL );
- } else {
- error_reporting( E_ALL );
- }
- 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', WP_CONTENT_DIR . '/debug.log' );
- }
- } else {
- error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
- }
- if ( defined( 'XMLRPC_REQUEST' ) )
- ini_set( 'display_errors', 0 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement