WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#33551 assigned enhancement

Settings API: Filter sections and fields before displaying them

Reported by: obenland Owned by: obenland
Milestone: Future Release 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)

33551.diff (1.5 KB) - added by obenland 2 years ago.

Download all attachments as: .zip

Change History (5)

@obenland
2 years ago

#1 @obenland
2 years ago

  • Keywords has-patch needs-docs added
  • Version set to 2.7

Needs a docs review obviously.

/cc @drewapicture.

This ticket was mentioned in Slack in #core by sergey. View the logs.


2 years ago

#3 @SergeyBiryukov
2 years ago

  • Owner set to obenland
  • Status changed from new to assigned

#4 @obenland
2 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.

Note: See TracTickets for help on using tickets.