Created
June 7, 2018 05:08
-
-
Save wadadanet/00d51d534d5de01c51e4cdd82e7fb359 to your computer and use it in GitHub Desktop.
wordpress 知りたい要素のファイルを一瞬で調べる方法
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
function echo_filename(){ | |
if(WP_DEBUG){ | |
$obj = debug_backtrace(); | |
$parent = $obj[0]; | |
$path = $parent['file']; | |
$filename = basename($path); | |
echo "<!-- $filename -->"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment