[wp-trac] [WordPress Trac] #15335: register_setting() filter for sanitization callback needs to indicate 2 arguments accepted

WordPress Trac noreply at wordpress.org
Sun Mar 25 22:30:03 UTC 2018


#15335: register_setting() filter for sanitization callback needs to indicate 2
arguments accepted
--------------------------------+-----------------------------
 Reporter:  lumination          |       Owner:  markjaquith
     Type:  defect (bug)        |      Status:  reopened
 Priority:  normal              |   Milestone:  Future Release
Component:  Options, Meta APIs  |     Version:  3.1
 Severity:  normal              |  Resolution:
 Keywords:  close               |     Focuses:  administration
--------------------------------+-----------------------------

Comment (by seanleavey):

 Replying to [comment:21 peterwilsoncc]:
 > Over in #43629, @seanleavey has suggested adding the priority and number
 of arguments accepted to the `register_setting` arguments. This could be a
 workaround for #14671.
 >
 > This would require modification to `unregister_setting` removing the
 filter.
 >
 > I'm undecided on the suitability of this solution.
 It's not as nice as #14671's proposal, but it's better than nothing.
 Saying that, since WordPress 5.0 is round the corner, could this be the
 time to break backwards compatibility regarding `intval` as a filter? The
 message could just be: don't use `intval` and other functions that don't
 have a suitable signature for a WordPress sanitization filter.

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


More information about the wp-trac mailing list