[wp-trac] [WordPress Trac] #38323: Reconsider $object_subtype handling in `register_meta()`
WordPress Trac
noreply at wordpress.org
Thu May 10 17:55:23 UTC 2018
#38323: Reconsider $object_subtype handling in `register_meta()`
-------------------------------------------------+-------------------------
Reporter: flixos90 | Owner: flixos90
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.0
Component: Options, Meta APIs | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests needs- | Focuses: rest-api
dev-note |
-------------------------------------------------+-------------------------
Comment (by johnjamesjacoby):
I don’t like the “subtype” naming:
* it doesn’t exist anywhere in the database schema or code
* it conveys there is only 1 additional layer of variation
* we would not want subsubsub types
* it’s too ambiguous - what a “subtype” means for a post is different than
a taxonomy and a user and a comment and so on
I’m +1 that register_meta needs a way to understand object variations, but
I’m -1 on all of the current suggested approaches. They are too limiting,
and only serve very specific purposes.
I would much prefer a way to provide an array of arguments that get parsed
and compared against the object, making the “subtype” more of a set of
properties than just a hard-coded restriction.
For example, I want to register meta that’s only for posts of a certain
type and status. If the type and status are not a match, then don’t do
anything.
This is bigger than types or subtypes. This is a meta variation, or a meta
model, or a meta map. I’m not sure exactly on what it should be called,
but subtypes locks us into it being a omething it shouldn’t be.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38323#comment:46>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list