[wp-trac] [WordPress Trac] #34659: Whitelist for validation functions which only accept one argument

WordPress Trac noreply at wordpress.org
Wed Nov 11 15:13:55 UTC 2015


#34659: Whitelist for validation functions which only accept one argument
-----------------------------+------------------
 Reporter:  danielbachhuber  |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  4.4
Component:  REST API         |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+------------------

Comment (by TimothyBlynJacobs):

 In most cases it would be fine, but it'd be a problem with functions that
 use a variable number of arguments.

 I'd imagine something like this. Though you're right that'd get clunky as
 well. Especially for a object function name pair.

 {{{#!php
 $arg['validate_callback'] = array( 'myfunction', 1 );
 }}}

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


More information about the wp-trac mailing list