Make WordPress Core


Ignore:
Timestamp:
09/26/2010 08:51:34 AM (14 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r15653 r15661  
    19161916        if ( 'edit' == $name && isset($screen->post_type) && 'page' == $screen->post_type )
    19171917            $name = 'edit-pages';
     1918
     1919        $class = 'icon32';
     1920        if ( isset( $screen->post_type ) )
     1921            $class .= ' ' . sanitize_html_class( 'icon32-posts-' . $screen->post_type );
    19181922    }
    19191923
    19201924?>
    1921     <div id="icon-<?php echo $name; ?>" class="icon32"><br /></div>
     1925    <div id="icon-<?php echo $name; ?>" class="<?php echo $class; ?>"><br /></div>
    19221926<?php
    19231927}
Note: See TracChangeset for help on using the changeset viewer.