[wp-trac] [WordPress Trac] #37885: Build out register_setting like register_meta
WordPress Trac
noreply at wordpress.org
Tue Aug 30 15:54:57 UTC 2016
#37885: Build out register_setting like register_meta
--------------------------------+------------------------------------
Reporter: joehoyle | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.7
Component: Options, Meta APIs | Version: trunk
Severity: normal | Keywords: has-patch dev-feedback
Focuses: |
--------------------------------+------------------------------------
In 4.6 the diligent work was done to beef out `register_meta()` to be much
more extensible. For use in the REST API, I'd like have a similar API for
registered settings.
Register settings and meta is quite similar (settings are after all just
meta on the site object ;) ) so I think we can take a lot of design queues
from `register_meta` and bring them into `register_setting`. However, as
settings are not shared across any "object type", the way they are stored
in a global can probably be a bit simpler.
Much like `register_meta` I propose we change the function signature to
`register_setting( $option_group, $option_name, $args = array() )`.
I've attached an initial patch of the kind of thing I'm thinking.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37885>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list