Skip to content

Commit

Permalink
Add post-type-$post_type and taxonomy-$taxonomy admin body classes.
Browse files Browse the repository at this point in the history
props johnbillion.
fixes #19247.

Built from https://develop.svn.wordpress.org/trunk@25124


git-svn-id: http://core.svn.wordpress.org/trunk@25104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
nacin committed Aug 26, 2013
1 parent a66fde2 commit 7e17787
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions wp-admin/admin-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
if ( is_rtl() )
$admin_body_class .= ' rtl';

if ( $current_screen->post_type )
$admin_body_class .= ' post-type-' . $current_screen->post_type;

if ( $current_screen->taxonomy )
$admin_body_class .= ' taxonomy-' . $current_screen->taxonomy;

$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) );
$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', $wp_version ) );
$admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
Expand Down

0 comments on commit 7e17787

Please sign in to comment.