[wp-trac] [WordPress Trac] #41273: WP REST API: allow separate add_post_type_support() for post when accessing via REST vs WP Admin
WordPress Trac
noreply at wordpress.org
Mon Jul 10 07:07:47 UTC 2017
#41273: WP REST API: allow separate add_post_type_support() for post when accessing
via REST vs WP Admin
-----------------------------+------------------------------
Reporter: lougreenwood | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: REST API | Version: 4.8
Severity: normal | Resolution:
Keywords: | Focuses: rest-api
-----------------------------+------------------------------
Comment (by rmccue):
I'm not sure exactly what your use case is here; if you could elaborate
exactly what you're trying to achieve, that would be pretty useful.
Are you using the `add_post_type_support()` calls simply to add/remove
admin UI?
Generally speaking, the REST API represents the underlying data structures
in WordPress, and thus it doesn't make sense for it to support different
things to the admin. With that said, some of the post type supports are
used ambiguously in WordPress; in particular, things like `editor` can
control both whether you want the editor UI in the admin, and whether you
have post content at all.
We may be able to introduce new filters to enable turning off the UI
without changing the underlying post type support, which would probably be
a better way to solve this, if it's what you're doing.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41273#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list