Created
January 23, 2015 12:03
-
-
Save richjenks/0538db4968d31be77afe to your computer and use it in GitHub Desktop.
WP_DEBUG in JavaScript
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
add_action( 'wp_head', function () { | |
echo '<script>var WP_DEBUG = '; | |
echo ( defined( 'WP_DEBUG' ) && WP_DEBUG === true ) ? 'true' : 'false'; | |
echo ';</script>'; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment