Last active
January 21, 2016 05:32
-
-
Save mkormendy/3f514dc4aec3429edbfe to your computer and use it in GitHub Desktop.
Outputs the path of which php file is being called, at the top of that file, in HTML comments. Very useful for finding out which theme files and template parts are generating what part of the page.
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 if (ENV == 'dev') { echo "<!-- ////////////////////////////////////////////////////////////////////////////////////////////\n".pathinfo( __FILE__ )['dirname']."/".pathinfo( __FILE__ )['basename']."\n"."///////////////////////////////////////////////////////////////////////////////////////////// -->\n"; } ?> |
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 | |
/** | |
* Development Environment Constant. | |
* | |
* If this is a development environment this will turn on certain debugging codes found throughout | |
* theme and plugin files used for identifying code blocks and the file locations they reside in. | |
* | |
* Place at the end of the wp-config.php file after require_once(ABSPATH . 'wp-settings.php'); | |
* | |
* Comment out if on production environment. | |
* | |
*/ | |
$blog_id = get_current_blog_id(); | |
if ( $blog_id == 30 || $blog_id == 24 ) { | |
define('ENV', 'dev'); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment