Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#11625 closed enhancement (fixed)

Move default colours to a action hook

Reported by: dd32's profile dd32 Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Administration Keywords: has-patch
Focuses: Cc:


At present, wp_admin_css_color() is being called directly from wp-admin/admin.php this has the disadvantage, that if a plugin wants to hook and output a themed page to admin-post.php, its not possible to do that whilst retaining the colour themes. (As admin.php is only included for "content filled backend pages"

Attached patch moves it to a function thats hooked to admin_init.

Attachments (1)

11625.patch (1.7 KB) - added by dd32 13 years ago.

Download all attachments as: .zip

Change History (5)

13 years ago

#1 @hakre
13 years ago

Wouldn't it make sense to offer the hook (or another one) to actual be able to offer color-shemes by a plugin as well?

#2 @dd32
13 years ago

No. Not really. Theres the admin_init hook for initialising anything admin related, it suits fine.

I did think of adding a do_action('colours-init'); but didnt think it was really needed since it would become an alias for admin_init

#3 @dd32
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12982]) Move admin CSS colour themes to the admin_init hook. Fixes #11625

#4 @dd32
13 years ago

(In [13487]) Move Admin Colour Scheme picker to a hook. Props Jick. s/register_admin_color_themes()/register_admin_color_schemes/g. See #11625, Fixes #6837

Note: See TracTickets for help on using tickets.