Make WordPress Core

Opened 2 months ago

Last modified 2 months ago

#43069 new defect (bug)

Docs: improve documentation for register_meta() function

Reported by: terriann Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.1
Component: Options, Meta APIs Keywords: has-patch
Focuses: docs Cc:


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.


Attachments (1)

43069.diff (4.0 KB) - added by terriann 2 months ago.
Improve documentation for register_meta() function

Download all attachments as: .zip

Change History (2)

2 months ago

Improve documentation for register_meta() function

#1 @terriann
2 months 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

Note: See TracTickets for help on using tickets.