From e4e96c17b20c8f57fcbc42cb60ec7d673da4eee3 Mon Sep 17 00:00:00 2001 From: azaozz Date: Wed, 3 Jun 2009 07:06:45 +0000 Subject: [PATCH] Add $hook_suffix as js var, fixes #10008 git-svn-id: http://svn.automattic.com/wordpress/trunk@11508 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-header.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 2944e7154a..27c496a710 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -27,13 +27,21 @@ wp_admin_css( 'css/colors' ); wp_admin_css( 'css/ie' ); wp_enqueue_script('utils'); +$hook_suffix = ''; +if ( isset($page_hook) ) + $hook_suffix = "$page_hook"; +else if ( isset($plugin_page) ) + $hook_suffix = "$plugin_page"; +else if ( isset($pagenow) ) + $hook_suffix = "$pagenow"; + +$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix); ?>