[wp-trac] [WordPress Trac] #37638: Allow plugins to do comprehensive late validation of settings

WordPress Trac noreply at wordpress.org
Thu Aug 11 19:28:49 UTC 2016


#37638: Allow plugins to do comprehensive late validation of settings
-------------------------+--------------------
 Reporter:  westonruter  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  4.7
Component:  Customize    |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+--------------------

Comment (by chandrapatel):

 Replying to [comment:2 westonruter]:
 > There is a problem with your alternate solution to move the
 `apply_filters` call: this needs to be done inside the `validate` method
 because if filters are used for validation, then if a plugin calls the
 `validate()` method somewhere else then it won't then work. It is intended
 that the `validate()` should be able to be called from other places than
 just `validate_setting_values()`.

 Oh yes, I got your point.

 > I don't really see applying filters a second time to be a big problem.

 Then Option-1 solution is better instead of introducing new filter. And
 also developer no need to rely on two different filters.

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


More information about the wp-trac mailing list