-
-
Save wp-entwickler-at/d3a61ca0cd710cb6f03f to your computer and use it in GitHub Desktop.
[WordPress] Enable debug mode via URL. Props @bueltge.
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
<?php | |
/** | |
* Better: use nonces, or less obvious query arguments. | |
* http://glueckpress.com/?show_me=💩 | |
*/ | |
if ( isset( $_GET['show_me'] ) && $_GET['show_me'] === '💩') { | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_DISPLAY', true ); | |
} else { | |
define( 'WP_DEBUG', false ); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
} | |
define( 'WP_DEBUG_LOG', false ); |
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
<?php | |
/** | |
* Debugging via URL paramter. | |
* http://example.com/?wp_debug=true | |
* | |
* Props @bueltge | |
* @link https://github.com/bueltge/WordPress-Starter/blob/master/wp-config.php#L3-L6 | |
*/ | |
if ( isset($_GET['wp_debug']) && $_GET['wp_debug'] === 'true') { | |
define( 'WP_DEBUG', true ); | |
} else { | |
define( 'WP_DEBUG', false ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment