enable WP_DEBUG with a url
-
Many developers need to enable WP_DEBUG constant, but modyfing wp-config.php is ver inconvenient.. so, i have an idea…
in wp-config.php (or somewhere you know better) there should be a functionality,to do the following:
Let’s say, when I access site with parameter:
mysite.com/?debug=on
then :
1) check if i am admin ( or paragraph doesnt matter )
2) ask me confirmation message: Warning? Are you sure you really want to enable debug?if yes, then set special cookie for me … and re-direct to the homepage..
After that, whenever WP sees that i have that cookie, then enable WP_DEBUG + WP_DEBUG_DISPLAY for me ( BUT that should be enabled ONLY when the front-end is accessed… for /wp-admin/, dont enable them..)I should be able DISABLE that using:
mysite.com/?debug=off
- The topic ‘enable WP_DEBUG with a url’ is closed to new replies.