[wp-trac] [WordPress Trac] #38323: Reconsider $object_subtype handling in `register_meta()`

WordPress Trac noreply at wordpress.org
Mon Jun 18 07:56:24 UTC 2018


#38323: Reconsider $object_subtype handling in `register_meta()`
-------------------------------------------------+-------------------------
 Reporter:  flixos90                             |       Owner:  kadamwhite
     Type:  enhancement                          |      Status:  reviewing
 Priority:  normal                               |   Milestone:  5.0
Component:  Options, Meta APIs                   |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-dev-note has-unit-   |     Focuses:  rest-api
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by spacedmonkey):

 So my patch did 4 things.

 1. Fixed the `$object_id` being passed to the `get_post_type` function.
 This on is a no brainer and should remain in the patch.
 2. Added support for site meta (blog meta) in `get_object_subtype`.
 @flixos90  I am extremely confused why this would be removed in your
 patch. I worked on blog meta and I know that this check will work.
 Blog meta has been in a core for months now and releasing this patch
 without support doesn't make any sense to me at all.
 Can you please explain why it shouldn't be in this patch?
 3. Add sub type to `is_protected_meta`.
 After a long chat with @rmccue and @kadamwhite about this, we agree for
 the sake of completeness, that this work should be done.
 Not adding it to protected meta, makes protected meta an outlier. If it
 doesn't go in this patch,
 it should go in very soon after in another patch.
 4. Removed comment type
 So comment type is something that I really wanted in this patch.
 However, when I looked into it, there is no comment_type passed in the
 comments rest controller. Both post and terms, pass post type / taxonomy
 into the controller, making this possible.
 However there is no comment type and no comment type api. I was surprised
 to find that there is no `register_comment_type` in core. Without this
 basic ways of core know the comment type, it is impossible to support.
 I want to work on `register_comment_type` but it is massively out of scope
 for this ticket.

 TLDR.
 - Fixed the `$object_id` is good.
 - Site meta is should remain in, as it is in truck.
 - is protected meta sub type should is good but should likely move to
 another ticket for the sake of cleaness.
 - Comment types are impossible to support because a lack of
 `register_comment_type`

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/38323#comment:79>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list