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

git-svn-id: https://develop.svn.wordpress.org/trunk@15661 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-09-26 08:51:34 +00:00
parent f445cbf975
commit 6aea75f676
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
}