#45464 closed defect (bug) (fixed)
Document some examples of object types accepted by register_meta()
Reported by: | DrewAPicture | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.4 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | Options, Meta APIs | Keywords: | good-first-bug has-patch commit |
Focuses: | docs | Cc: |
Description
As pointed out in a contributor note by @janwoostendorp, the current description for the $object_type
parameter in register_meta()
is a little vague: "Type of object this meta is registered to."
We could do better about documenting a few potential object types that it can accept. Obviously it's not limited to core object types, but giving some examples provides insight into what's expected.
Best recommendation for a patch would be to add an open-ended statement to the description along the lines of "Accepts ... or any other object with an associated meta table."
Attachments (2)
Change History (10)
#3
@
5 years ago
- Milestone changed from Awaiting Review to 5.4
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
#4
@
5 years ago
45464.diff is sheparddw's original patch added to Trac to make it a bit easier to read/apply using the WP patch command. ( https://scribu.net/wordpress/contributing-to-wordpress-using-github.html is a handy guide, even though PRs are now accepted).
45464.2.diff fixes a couple of spacing issues in the original patch.
Updated the codex and docblocks.
Let me know if this is what you mean. :)
PR: https://github.com/sheparddw/wordpress-develop/pull/1/files
https://patch-diff.githubusercontent.com/raw/sheparddw/wordpress-develop/pull/1.diff
Codex: https://codex.wordpress.org/Function_Reference/register_meta