Opened 9 years ago
Last modified 9 years ago
#43069 new defect (bug)
Docs: improve documentation for register_meta() function
| Reported by: | terriann | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Options, Meta APIs | Version: | 4.9.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | docs |
Description
The documentation for the register_meta() function would benefit from additional clarity to help developers recognize that the $object_type parameter does not mean custom post type and the implications that registering the meta field applies to all objects of a type.
Within that method there are also missing default values and optional markers in the docblock as well as a backwards compatibility comment that could be more specific and useful in an inline comment.
https://developer.wordpress.org/reference/functions/register_meta/
Attachments (1)
Change History (2)
#1
@
9 years ago
- Keywords has-patch added
Sample input for $object_type modeled after https://developer.wordpress.org/reference/functions/register_rest_field/
Ported over some changes missing in Dev hub from the Codex https://codex.wordpress.org/Function_Reference/register_meta
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Improve documentation for register_meta() function