has_action and has_filter. see #5231

git-svn-id: https://develop.svn.wordpress.org/trunk@6320 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-11-07 04:30:11 +00:00
parent 35f22f56cf
commit d5ed4b3d7d
4 changed files with 68 additions and 11 deletions

View File

@@ -329,10 +329,8 @@ function get_admin_page_title() {
}
function get_plugin_page_hook( $plugin_page, $parent_page ) {
global $wp_filter;
$hook = get_plugin_page_hookname( $plugin_page, $parent_page );
if ( isset( $wp_filter[$hook] ))
if ( has_action($hook) )
return $hook;
else
return null;