More screen icons and fixes, includes patch by johnconners, fixes #8380

git-svn-id: http://svn.automattic.com/wordpress/trunk@9912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz
2008-11-26 23:35:23 +00:00
parent 5410af6e2a
commit f0b7562b48
13 changed files with 161 additions and 86 deletions

View File

@@ -3327,14 +3327,15 @@ function add_contextual_help($screen, $help) {
$_wp_contextual_help[$screen] = $help;
}
function screen_icon() {
function screen_icon($name = '') {
global $parent_file, $hook_suffix;
if ( isset($parent_file) && !empty($parent_file) )
$name = substr($parent_file, 0, -4);
else
$name = str_replace(array('.php', '-new', '-add'), '', $hook_suffix);
if ( empty($name) ) {
if ( isset($parent_file) && !empty($parent_file) )
$name = substr($parent_file, 0, -4);
else
$name = str_replace(array('.php', '-new', '-add'), '', $hook_suffix);
}
unset($hook_suffix);
?>
<div id="icon-<?php echo $name; ?>" class="icon32"><br /></div>