#38393 closed task (blessed) (fixed)
Add support for "integer" type for meta and options
Reported by: | flixos90 | Owned by: | joehoyle |
---|---|---|---|
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
@
8 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.
8 years ago
#4
@
8 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
integer
type to be used with the REST API.