[wp-trac] [WordPress Trac] #39042: REST API: Allow sanitization_callback to be set to null to bypass `rest_parse_request_arg()`

WordPress Trac noreply at wordpress.org
Tue Dec 6 05:14:38 UTC 2016


#39042: REST API: Allow sanitization_callback to be set to null to bypass
`rest_parse_request_arg()`
--------------------------------------+---------------------------
 Reporter:  rachelbaker               |       Owner:  kkoppenhaver
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  4.7.1
Component:  REST API                  |     Version:  trunk
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------------

Comment (by jnylen0):

 In [attachment:39042.3.diff]:

 - Restructure this code block a bit more to get rid of the nested
 conditional and shorten up some long lines
 - One assertion per test (separate tests for `null` and `false`)

 I also removed the `@ticket` annotation from the tests as I don't think it
 adds much value: I'm not sure why you'd need this information, but if you
 do, you can find it via blame.

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


More information about the wp-trac mailing list