[wp-trac] [WordPress Trac] #38323: Reconsider $object_subtype handling in `register_meta()`
WordPress Trac
noreply at wordpress.org
Sun Oct 16 14:24:36 UTC 2016
#38323: Reconsider $object_subtype handling in `register_meta()`
--------------------------------+-----------------------------
Reporter: flixos90 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version:
Severity: normal | Keywords: needs-patch
Focuses: |
--------------------------------+-----------------------------
While `register_meta()` was originally planned to support object subtypes
(e.g. post types in the case of post meta, taxonomies in the case of term
meta), this feature was dropped in [changeset:38095], mainly because it
needed further thought.
I think we should continue to think how we can implement this feature.
Many plugins use meta in ways that are specific to a subtype, so it
doesn't make sense for them to use `register_meta()` now because it would
mean that for example some e-commerce plugin's product data would suddenly
be exposed on any post type. The current implementation can also lead to
conflicts very easily: Imagine one plugin registers an `email` meta key
for a custom post type, and another plugin registers an `email` meta key
for another post type, and the metadata has a different structure - such
thing can raise several issues.
I really like the new enhanced way `register_meta()` works, but without
subtype handling it is still useless for many occasions. Therefore let's
continue work on that function.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38323>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list