Opened 8 years ago
Closed 7 years ago
#40318 closed enhancement (fixed)
Document valid `type` parameters in register_meta() arguments
Reported by: | iandunn | Owned by: | rmccue |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | minor | Version: | 4.7 |
Component: | Options, Meta APIs | Keywords: | has-patch commit |
Focuses: | docs | Cc: |
Description
The valid types aren't documented, so I had to go digging through the source to find them.
The REST API defines them as 'string', 'boolean', 'integer', 'number'
in
class-wp-rest-meta-fields.php
I haven't verified that there aren't other valid types used outside the API.
Attachments (2)
Change History (9)
#3
@
8 years ago
Hi @SergeyBiryukov
Added the valid types for the register_setting() function.
Thank you
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
7 years ago
Note: See
TracTickets for help on using
tickets.
The same list appears to apply to
register_setting()
: https://core.trac.wordpress.org/browser/tags/4.7.3/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php?marks=263#L259