[wp-trac] [WordPress Trac] #38323: Reconsider $object_subtype handling in `register_meta()`
WordPress Trac
noreply at wordpress.org
Tue Dec 27 17:29:37 UTC 2016
#38323: Reconsider $object_subtype handling in `register_meta()`
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Options, Meta APIs | Review
Severity: normal | Version:
Keywords: has-patch needs-unit-tests 2nd- | Resolution:
opinion | Focuses:
-------------------------------------------------+-------------------------
Comment (by tharsheblows):
I think this works already, at least for post types. What tripped me up
originally was remembering to add `'supports' => array('custom-fields')`
when registering the post type -- also, `register_meta()` uses object
types so custom post types are registered using `post` eg
`register_meta('post', 'meta_key', $args)`
Attached are unit tests.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38323#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list