Opened 9 years ago
Last modified 5 years ago
#33551 assigned enhancement
Settings API: Filter sections and fields before displaying them
Reported by: | obenland | Owned by: | obenland |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.7 |
Component: | Options, Meta APIs | Keywords: | has-patch needs-docs |
Focuses: | Cc: |
Description
Once a section or settings field was added, there is currently no good way to remove it or change the order they are displayed in. It would be good to add filters in do_settings_section()
and do_settings_fields()
to allow for that to happen.
We could also think about providing convenience functions to use in a callback to those filters, along the lines of remove_option_whitelist()
.
Attachments (1)
Change History (6)
This ticket was mentioned in Slack in #core by sergey. View the logs.
9 years ago
#4
@
9 years ago
- Milestone changed from 4.4 to Future Release
Helen asked to wait with this until the Fields API had a chance to inform us better about the plan for the Settings API.
#5
@
5 years ago
I've run into a need of filtering the settings fields today and was about to open a ticket introducing very similar filters :)
Not sure how much the Settings API has changed since 4 years ago, but feels like the patch is still applicable and eventually useful. Any chance this gets re-proritised, and eventually scheduled for some future release?
Needs a docs review obviously.
/cc @drewapicture.