Skip to content

Instantly share code, notes, and snippets.

@wp-entwickler-at
Forked from glueckpress/wp-config.php
Created December 18, 2015 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wp-entwickler-at/d3a61ca0cd710cb6f03f to your computer and use it in GitHub Desktop.
Save wp-entwickler-at/d3a61ca0cd710cb6f03f to your computer and use it in GitHub Desktop.
[WordPress] Enable debug mode via URL. Props @bueltge.
<?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 );
<?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