From b205913daab276bd9f5b8b61cd018d62fd8b1653 Mon Sep 17 00:00:00 2001 From: nacin Date: Sun, 26 Sep 2010 09:34:09 +0000 Subject: [PATCH] Apply [15661] to the edit-tags.php screens. fixes #14959. see #14886 for current_screen. git-svn-id: http://svn.automattic.com/wordpress/trunk@15664 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/template.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 03612891fa..c6ca29bf13 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -1900,13 +1900,15 @@ function screen_options($screen) { } function screen_icon($screen = '') { - global $current_screen; + global $current_screen, $typenow; if ( empty($screen) ) $screen = $current_screen; elseif ( is_string($screen) ) $name = $screen; + $class = 'icon32'; + if ( empty($name) ) { if ( !empty($screen->parent_base) ) $name = $screen->parent_base; @@ -1916,9 +1918,13 @@ function screen_icon($screen = '') { if ( 'edit' == $name && isset($screen->post_type) && 'page' == $screen->post_type ) $name = 'edit-pages'; - $class = 'icon32'; + $post_type = ''; if ( isset( $screen->post_type ) ) - $class .= ' ' . sanitize_html_class( 'icon32-posts-' . $screen->post_type ); + $post_type = $screen->post_type; + elseif ( $current_screen == $screen ) + $post_type = $typenow; + if ( $post_type ) + $class .= ' ' . sanitize_html_class( 'icon32-posts-' . $post_type ); } ?>