[wp-trac] [WordPress Trac] #34659: Whitelist for validation functions which only accept one argument
WordPress Trac
noreply at wordpress.org
Mon Dec 5 02:10:13 UTC 2016
#34659: Whitelist for validation functions which only accept one argument
-----------------------------+-----------------------------
Reporter: danielbachhuber | Owner: rmccue
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: REST API | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-----------------------------+-----------------------------
Comment (by brianhogg):
@joshlevinson the decision on `_single_arg` was that a) people would
likely either want just the value or the three params and b) its not
really clear what passing "2" would do or passing
`sanitize/validate_callback_args` with a value greater than 3
(error/warning? no effect?)
If there's a case we missed where one would just want 2 args passed
without using an anonymous function for the callback (ie. value and the
request object, but without the key) could go with the args count
approach?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34659#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list