#38393 closed task (blessed) (fixed)
Add support for "integer" type for meta and options
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.7 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | REST API | Keywords: | has-patch |
| Focuses: | Cc: |
Description
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.
Attachments (2)
Change History (10)
#2
@
9 years ago
38393.2.diff also updates the relevant register_setting() calls to use integer instead of number (all of the three fields are integers, not floats).
This ticket was mentioned in Slack in #core-restapi by rachelbaker. View the logs.
9 years ago
#4
@
9 years ago
- Milestone changed from Awaiting Review to 4.7
- Owner set to joehoyle
- Status changed from new to assigned
Assigning to @joehoyle to review and milestone
38393.diff adds support for the
integertype to be used with the REST API.