ThemeAvenue / BetterOptin

BetterOptin is a free exit intent popup plugin for WordPress.
https://betteropt.in
GNU General Public License v2.0
4 stars 1 forks source link

Instead of defining my own DEBUG variable, use WP_DEBUG #8

Closed siamkreative closed 8 years ago

siamkreative commented 9 years ago

In public/assets/js/betterOptin-config.js, I should be using a variable called wpDebug instead, that is true when WP_DEBUG is enabled. Therefore, the console.log() would automatically trigger.

siamkreative commented 8 years ago

Actually, I think it should work that way:

Remove console.log() programmatically

https://github.com/ehynds/grunt-remove-logging https://www.npmjs.com/package/grunt-contrib-uglify#conditional-compilation

siamkreative commented 8 years ago

We're already using gulp-strip-debug here https://github.com/ThemeAvenue/BetterOptin/blob/master/gulpfile.js#L81

siamkreative commented 8 years ago

8c268ea35be4ba291edbdab8d7083834428e6e89