Make WordPress Core

Changeset 25124


Ignore:
Timestamp:
08/26/2013 06:17:23 PM (11 years ago)
Author:
nacin
Message:

Add post-type-$post_type and taxonomy-$taxonomy admin body classes.

props johnbillion.
fixes #19247.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/admin-header.php

    r25103 r25124  
    8181    $admin_body_class .= ' rtl';
    8282
     83if ( $current_screen->post_type )
     84    $admin_body_class .= ' post-type-' . $current_screen->post_type;
     85
     86if ( $current_screen->taxonomy )
     87    $admin_body_class .= ' taxonomy-' . $current_screen->taxonomy;
     88
    8389$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) );
    8490$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', $wp_version ) );
Note: See TracChangeset for help on using the changeset viewer.