Add a post type class to screen icons. props jfarthing84 for initial patch. see #14959.

git-svn-id: http://svn.automattic.com/wordpress/trunk@15661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-09-26 08:51:34 +00:00
parent a89ebb3322
commit 47b9b4ab1c
1 changed files with 5 additions and 1 deletions

View File

@ -1915,10 +1915,14 @@ function screen_icon($screen = '') {
if ( 'edit' == $name && isset($screen->post_type) && 'page' == $screen->post_type )
$name = 'edit-pages';
$class = 'icon32';
if ( isset( $screen->post_type ) )
$class .= ' ' . sanitize_html_class( 'icon32-posts-' . $screen->post_type );
}
?>
<div id="icon-<?php echo $name; ?>" class="icon32"><br /></div>
<div id="icon-<?php echo $name; ?>" class="<?php echo $class; ?>"><br /></div>
<?php
}