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

WordPress Trac noreply at wordpress.org
Wed Sep 21 09:01:04 UTC 2016


#37885: Build out register_setting like register_meta
---------------------------------------------+-----------------------
 Reporter:  joehoyle                         |       Owner:  joehoyle
     Type:  enhancement                      |      Status:  reopened
 Priority:  normal                           |   Milestone:  4.7
Component:  Options, Meta APIs               |     Version:  trunk
 Severity:  normal                           |  Resolution:
 Keywords:  needs-unit-tests needs-dev-note  |     Focuses:
---------------------------------------------+-----------------------

Comment (by stephenharris):

 Currently the third option for `register_setting()` is a callback, and for
 reasons for backwards compatibility that callback cannot be hooked onto
 `sanitize_option_{$option_name}` with the three arguments that are
 available (see #15335) - however, if we now support an `$args` array with
 `sanitize_callback` key then there are no backward-compatibility concerns,
 so  we could pass all three arguments to ''that'' callback.

 Admittedly it involves another if statement, and another degree of
 complexity - but what do people think about passing all three arguments
 when the callback is specified in the `$args` array?

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


More information about the wp-trac mailing list