Last active
May 8, 2023 20:10
-
-
Save bstonedev/8cd4d3b7de3cd0933934111dd3d45e10 to your computer and use it in GitHub Desktop.
custom-debug-logic.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', true); | |
if( isset($_GET['debug']) && str_contains($_SERVER['SERVER_NAME'], "stonedigital.dev") ) { | |
// Only allow debug toggle in staging websites | |
define('WP_DEBUG_DISPLAY', true); | |
} else { | |
define('WP_DEBUG_DISPLAY', false); | |
} | |
define( 'WP_DEBUG_LOG', 'wp-content/debug-' . date('Y-m-d') . '-dev.log' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment