Opened 9 years ago
Last modified 4 weeks ago
#38734 assigned enhancement
Dogfood the Settings API
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Future Release | Priority: | normal |
| Severity: | normal | Version: | 2.7 |
| Component: | Options, Meta APIs | Keywords: | needs-patch settings-api |
| Focuses: | accessibility, administration | Cc: |
Description
WordPress has had a Settings API for eight years, but the core settings screens in WordPress don't use it. Instead, these screens use hardcoded sections and fields, which means it's impossible for a plugin to remove sections or fields without removing the entire screen.
There's a new Fields API in development but this doesn't mean the core settings screens shouldn't be improved in the meantime by switching to the Settings API.
I think the best approach for this is to address one screen at a time, starting with General Settings, and go from there.
If anyone thinks this change should not be made, speak now or forever hold your peace.
Attachments (2)
Change History (22)
#3
in reply to:
↑ 2
@
9 years ago
- Focuses accessibility added
Replying to sc0ttkclark:
by the way, there are certain settings fields on these screens which are not easily reproduced with the normal Settings API sections > fields structure
It would be a very good opportunity to simplify some of the settings controls :) see for example #31354 and #31356
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
9 years ago
#5
@
9 years ago
- Milestone changed from Awaiting Review to 4.8
Discussed in today's weekly accessibility bug-scrub and we'd like to try to do this for at least the General Settings page for 4.8.
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
9 years ago
#7
@
9 years ago
Related (and closed as "maybelater"): #18285 perhaps the most interesting discussion about the Settings API is there.
#10
@
9 years ago
38734.diff is an MVP (minimum viable patch) which does the following for the General Settings screen:
- Registers all of the settings.
- Registers fields for each of the existing settings table rows.
- Migrates all the hardcoded fields into settings fields.
TODO: Replace all the new procedural functions with a nice class per settings screen (eg. WP_Settings_General) with a method for each field and setting.
#11
@
9 years ago
Noticed there are (also in the current options-general.php) a couple misplaced <span> elements and just thought to fix them. No other changes in the refreshed patch.
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
9 years ago
This ticket was mentioned in Slack in #accessibility by sc0ttkclark. View the logs.
9 years ago
This ticket was mentioned in Slack in #core by johnbillion. View the logs.
9 years ago
This ticket was mentioned in Slack in #core by afercia. View the logs.
9 years ago
#16
@
9 years ago
- Milestone changed from 4.8 to Future Release
Punting as we're running out of time for the 4.8 release.
This ticket was mentioned in Slack in #core by afercia. View the logs.
8 years ago
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
8 years ago
#20
@
4 weeks ago
I'm curious about the status of this issue/proposal. It seems set as Future Release, and got some positive comments with nobody really speaking out against the idea, but hasn't gone anywhere in 8 years (beyond John removing himself as owner).
It's still wild to me that Core doesn't "dogfood" its own Settings API. There are plenty of core settings that we don't want our Site Administrators controlling in our MultiSite environments, and we're forced to rely on JS/CSS hacks to try to hide them from people rather than simply and securely removing them with a single line of code.
This would significantly help us in our work with the Fields API by the way, there are certain settings fields on these screens which are not easily reproduced with the normal Settings API sections > fields structure as currently built.