Opened 8 years ago
Last modified 3 years ago
#38734 assigned enhancement
Dogfood the Settings API
Reported by: | johnbillion | 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 (21)
#3
in reply to:
↑ 2
@
8 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.
8 years ago
#5
@
8 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.
8 years ago
#7
@
8 years ago
Related (and closed as "maybelater"): #18285 perhaps the most interesting discussion about the Settings API is there.
#10
@
8 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
@
8 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.
8 years ago
This ticket was mentioned in Slack in #accessibility by sc0ttkclark. View the logs.
8 years ago
This ticket was mentioned in Slack in #core by johnbillion. View the logs.
8 years ago
This ticket was mentioned in Slack in #core by afercia. View the logs.
8 years ago
#16
@
8 years ago
- Milestone changed from 4.8 to Future Release
Punting as we're running out of time for the 4.8 release.
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.