#45464 closed defect (bug) (fixed)
Document some examples of object types accepted by register_meta()
| Reported by: | DrewAPicture | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.4 |
| Component: | Options, Meta APIs | Version: | 3.3 |
| Severity: | normal | Keywords: | good-first-bug has-patch commit |
| Cc: | Focuses: | docs |
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)
#4
@
6 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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