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:
parent
a89ebb3322
commit
47b9b4ab1c
|
@ -1915,10 +1915,14 @@ 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';
|
||||||
|
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
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue