Created
May 7, 2011 17:12
-
-
Save miya0001/960652 to your computer and use it in GitHub Desktop.
WordPress管理画面のhook_suffixをJavaScriptコンソールに出力する
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 | |
/* | |
Plugin name: Hook Suffix Console | |
*/ | |
add_action("admin_head", 'suffix2console'); | |
function suffix2console() { | |
global $hook_suffix; | |
if (is_user_logged_in()) { | |
$str = "<script type=\"text/javascript\">console.log('%s')</script>"; | |
printf($str, $hook_suffix); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment