Opened 9 years ago
Closed 9 years ago
#37340 closed task (blessed) (invalid)
Clarify inline documentation for object_subtype
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.6 |
Component: | Options, Meta APIs | Keywords: | needs-patch needs-docs |
Focuses: | docs | Cc: |
Description
#35658 introduced the concept (or at least the terminology) of an object subtype when registering meta fields. Reading the inline documentation, it's not at all clear what an object subtype is, or what value should be passed to this parameter.
* @param string $object_type The type of object. * @param string $object_subtype The subtype of the object type.
Documentation for the $object_subtype
parameter for the following functions and filters needs to be improved and made consistent:
sanitize_meta()
register_meta()
registered_meta_key_exists()
unregister_meta_key()
get_registered_meta_keys()
get_registered_metadata()
sanitize_{$object_type}_{$object_subtype}_meta_{$meta_key}
filtersanitize_{$object_type}_meta_{$meta_key}
filter
Change History (4)
This ticket was mentioned in Slack in #core by ocean90. View the logs.
9 years ago
Note: See
TracTickets for help on using
tickets.
Describing this in a clear way is going to be tough, but we should. :)
WP Core objects are post, user, comment, term.
How do we wrap that up into a sentence or two?