Make WordPress Core

Opened 15 years ago

Closed 13 years ago

#19247 closed enhancement (fixed)

Add post type and taxonomy to admin body class

Reported by: johnbillion Owned by: nacin
Priority: normal Milestone: 3.7
Component: Administration Version: 3.3
Severity: normal Keywords: has-patch 3.7-early commit
Cc: Focuses:

Description

I often have a need for targetted CSS selectors based on the current screen's post type (eg. to hide unwanted UI elements), so I usually end up adding post-type-{$post_type} with the admin_body_class filter. It'd be nice if this was in core.

Attachments (2)

19247.patch​ (811 bytes ) - added by johnbillion 15 years ago.
19247.2.patch​ (808 bytes ) - added by DrewAPicture 13 years ago.
space it since it's new

Download all attachments as: .zip

Change History (8)

@johnbillion
15 years ago

#1 @johnbillion
15 years ago

  • Keywords has-patch added

Patch

#2 @johnbillion
14 years ago

This patch still applies cleanly. Any chance of getting it into 3.6?

#3 @SergeyBiryukov
14 years ago

  • Keywords 3.7-early added

#4 @wonderboymusic
13 years ago

  • Milestone Awaiting Review → 3.7

these are all marked 3.7-early

@DrewAPicture
13 years ago

space it since it's new

#5 @DrewAPicture
13 years ago

  • Keywords commit added

19247.2.patch​ looks good to me.

#6 @nacin
13 years ago

  • Owner set to nacin
  • Resolution → fixed
  • Status new → closed

In 25124:

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

props johnbillion.
fixes #19247.

Note: See TracTickets for help on using tickets.