[wp-trac] [WordPress Trac] #38323: Reconsider $object_subtype handling in `register_meta()`
WordPress Trac
noreply at wordpress.org
Sat May 19 20:42:46 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 tharsheblows):
This adds in some tests for the patch which extends `register_meta` to
include subtypes. I've only done them for posts and terms as additional
tests don't add anything for comments and users.
For comments, although there are comment subtypes, there's nothing like
`register_comment_type` which can be used to add proper REST API support
for custom comment types. There's discussion of that in #35214 but I think
probably beyond the scope here.
One thing I noticed doing them was that because `register_meta` for
comments and users doesn't change at all, the suggestion by @helen
[https://wordpress.slack.com/archives/C02RQC26G/p1526663921000189 on
Slack] seems to me to make sense, ie wrapper functions now for the objects
which have subtypes and adding them in later for the others when they get
subtypes.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38323#comment:58>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list