[wp-trac] [WordPress Trac] #38393: Add support for "integer" type for meta and options

WordPress Trac noreply at wordpress.org
Thu Oct 20 10:59:14 UTC 2016


#38393: Add support for "integer" type for meta and options
-------------------------+-----------------------------
 Reporter:  flixos90     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  REST API     |    Version:
 Severity:  normal       |   Keywords:  needs-patch
  Focuses:               |
-------------------------+-----------------------------
 Currently the REST API only supports `string`, `number` and `boolean` for
 metadata and options (in other words, the `type` argument you specify in
 `register_meta()` and `register_setting()` respectively). However, JSON
 schema also supports `integer` in addition, so I think it's essential we
 need to support it as well (`number` means float, for that matter).

 To make it easier for PHP developers, we could even consider supporting
 `float` (and automatically adjust that to `number`), since the term
 `number` doesn't sound too specific regarding its actual scalar type.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38393>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list