Created
February 3, 2021 04:50
-
-
Save mykt0ngc0/0a1e75468892a75f2eda5ed9cdecd1a5 to your computer and use it in GitHub Desktop.
Enable WP_DEBUG only on the front-end.
This file contains hidden or 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
| <?php | |
| /* Enable Debugging (only on front-end) */ | |
| $is_admin = strpos($_SERVER['REQUEST_URI'], 'wp-admin'); | |
| if ($is_admin == false){ | |
| define( 'WP_DEBUG', true ); | |
| } | |
| /* That's all, stop editing! Happy publishing. */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment