WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 4 years ago

#6837 closed enhancement (fixed)

New hook to replace the admin color scheme chooser in user-edit.php

Reported by: Jick Owned by: nacin
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

I'd like to see a place to hook into right after the Admin Color Scheme chooser in user-edit.php. I want to be able to add a link there that says "Add a New Color Scheme" which will link to my plugin page. That would be very useful for my Easy Admin Color Schemes plugin I think.

That is such a simple modification I think it would be easy to include in 2.5.1.

I could see it's potential to be useful for other things as well...

Heck, maybe an even better idea would be to have a filter to allow complete customization of the Admin Color Scheme chooser area. Then, for example, you could completely replace the default Admin Color Scheme chooser with your own code. I can already think of a good way to use such a filter. For example, replace it with a customized list that has edit/delete links after each scheme which link to functionality in the plugin. Then you could do some basic scheme management right from the profile page.

Even once the WordPress core gets scheme customization features there could still be plugins out there that wish to have their own way of customizing schemes and managing them. So a hook/filter like I describe would still be useful then.

Attachments (1)

untitled.patch (3.1 KB) - added by Jick 5 years ago.
Patch to allow replacement of admin color scheme picker on user-edit.php

Download all attachments as: .zip

Change History (13)

comment:1 ionfish6 years ago

  • Keywords needs-patch added
  • Milestone changed from 2.5.1 to 2.6

2.5.1 is a maintenance release to fix bugs, not introduce new features.

comment:2 Jick6 years ago

2.5.1 is a maintenance release to fix bugs, not introduce new features.

My bad! Apologies...

comment:3 jacobsantos5 years ago

  • Milestone 2.9 deleted
  • Resolution set to invalid
  • Status changed from new to closed

It doesn't seem that section is meant to have a link to your plugin. If you want them to add a new plugin, then they should already know where to add them for your plugin. At that area, add ones that have already been created.

Jick5 years ago

Patch to allow replacement of admin color scheme picker on user-edit.php

comment:4 Jick5 years ago

  • Milestone set to 2.8.5
  • Priority changed from lowest to normal
  • Resolution invalid deleted
  • Severity changed from trivial to normal
  • Status changed from closed to reopened
  • Version changed from 2.5 to 2.9

I have a attached a patch that will allow for the replacement of the default color scheme picker. I have a new reason to need this. I have added the ability in the plugin to allow the admin to force a certain color scheme on all users. I would like to not allow the user to change their color scheme on their profile page to comply with this setting.

This is my first patch to core PHP code so it may not be right. I hope it is though.

comment:5 Jick5 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

comment:6 Jick5 years ago

  • Cc Jick added
  • Summary changed from New hook after the Admin Color Scheme chooser in user-edit.php to New hook to replace the admin color scheme chooser in user-edit.php

comment:7 Jick5 years ago

  • Milestone changed from 2.8.5 to 2.9

Not sure what I was thinking when I set the milestone to 2.8.5...

comment:8 Jick5 years ago

  • Keywords color schemes admin profile removed

comment:9 janeforshort4 years ago

  • Milestone changed from 2.9 to Future Release

Punting due to fact that we are already in beta, and only bug fixes are being committed now.

comment:10 Jick4 years ago

  • Milestone changed from Future Release to 3.0

I was hoping this might get in for 3.0. It's a rather small change.

comment:11 nacin4 years ago

  • Keywords needs-testing removed
  • Owner changed from anonymous to nacin
  • Status changed from reopened to reviewing

This seems fine for 3.0. Would like to get someone else to confirm that.

comment:12 dd324 years ago

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

(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.