[wp-trac] [WordPress Trac] #37885: Build out register_setting like register_meta

WordPress Trac noreply at wordpress.org
Wed Aug 31 13:28:18 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                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+--------------------

Comment (by sc0ttkclark):

 There's much more in common between Settings and Meta than different. Both
 use key/value storage, with support for serialization.

 In the `register_setting()` wrapper, we could implement Settings-specific
 things necessary to pass into `register_meta()` as arguments.

 In fact, in the Fields API, we treat them exactly the same between all
 other content types in WordPress with absolutely no problems. In the
 future, I can totally see that the Settings API itself will become powered
 by the Fields API.

 There are also multiple uses here for settings-related object types such
 as Settings (option) and Network Settings (site_option). Both require the
 same type of interfaces but different *storage*. They would both benefit
 having a uniform API, and with `register_meta()` at the heart of it.

 I don't think we're disagreeing here, we both know what Settings needs.
 I'd just like to see what prevents us from utilizing the `register_meta()`
 store for this information and wrapping it with `register_setting()`
 instead of creating the new global variable for storage of all settings.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37885#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list