[wp-trac] [WordPress Trac] #40838: REST API: Inconsistent parameter type handling in `set_param()`

WordPress Trac noreply at wordpress.org
Tue Jul 4 18:36:17 UTC 2017


#40838: REST API: Inconsistent parameter type handling in `set_param()`
-------------------------------------------------+-------------------------
 Reporter:  jnylen0                              |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  REST API                             |  Release
 Severity:  minor                                |     Version:  4.4
 Keywords:  good-first-bug has-patch has-unit-   |  Resolution:
  tests                                          |     Focuses:  rest-api
-------------------------------------------------+-------------------------
Changes (by vagios):

 * keywords:  needs-patch needs-unit-tests good-first-bug => good-first-bug
     has-patch has-unit-tests


Comment:

 In 40838.patch,
 * `set_param` function now updates the value of the given key if it exists
 in any parameter type. It will create a new param in the first parameter
 type if the key doesn't exist anywhere.
 * Add unit tests.
 * Update function documentation to describe the new behaviour.

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


More information about the wp-trac mailing list