Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#6448 closed enhancement (fixed)

wp_admin_css action should be split up

Reported by: duk3luk3 Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.3.2
Component: Administration Keywords: needs-patch
Focuses: Cc:


the action wp_admin_css is triggered when embedding several css files. this behaviour is described in the codex.

This means, if you want to override one admin stylesheet, you have to override them all, because there is no easy way of finding out which one is currently being replaced inside the callback. This adds load to the page, because you have to include e.g. upload.css in every admin page that is delivered to keep the layout intact!

So, this action should be split up into several actions, one for each stylesheet; or a parameter specifying the stylesheet being replaced could be introduced to the callback prototype. (the former maybe being less compatibility-breaking by leaving the wp_admin_css action as it is and introducing wp_admin_css_main, wp_admin_css_upload, wp_admin_css_login etc.)

Change History (7)

#1 @strider72
10 years ago

Can't you just add a custom stylesheet in admin_head and override that way?

#2 @ryan
10 years ago

  • Milestone changed from 2.7 to 2.8

#3 @mrmist
9 years ago

  • Keywords needs-patch 2nd-opinion added

9 years ago

  • Milestone changed from 2.8 to Future Release
  • Summary changed from wp_admin_css action should be splitted up to wp_admin_css action should be split up

In the new admin area, is this still a valid concern?

#5 @Denis-de-Bernardy
9 years ago

+1 to FFEMTcJ's remark. hasn't the current setup effectively fixed this?

#6 @Denis-de-Bernardy
9 years ago

  • Keywords 2nd-opinion removed

#7 @Denis-de-Bernardy
9 years ago

  • Milestone Future Release deleted
  • Resolution set to fixed
  • Status changed from new to closed

seems pluginable enough to me

Note: See TracTickets for help on using tickets.