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
This commit is contained in:
nacin 2010-09-26 09:34:09 +00:00
parent 28ad1d7dc1
commit b205913daa
1 changed files with 9 additions and 3 deletions

View File

@ -1900,13 +1900,15 @@ function screen_options($screen) {
} }
function screen_icon($screen = '') { function screen_icon($screen = '') {
global $current_screen; global $current_screen, $typenow;
if ( empty($screen) ) if ( empty($screen) )
$screen = $current_screen; $screen = $current_screen;
elseif ( is_string($screen) ) elseif ( is_string($screen) )
$name = $screen; $name = $screen;
$class = 'icon32';
if ( empty($name) ) { if ( empty($name) ) {
if ( !empty($screen->parent_base) ) if ( !empty($screen->parent_base) )
$name = $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 ) if ( 'edit' == $name && isset($screen->post_type) && 'page' == $screen->post_type )
$name = 'edit-pages'; $name = 'edit-pages';
$class = 'icon32'; $post_type = '';
if ( isset( $screen->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 );
} }
?> ?>