[wp-trac] [WordPress Trac] #55755: Enabling REST API on custom post type cause featured to be invisible on post, page, custom post type
WordPress Trac
noreply at wordpress.org
Wed Jun 29 23:24:40 UTC 2022
#55755: Enabling REST API on custom post type cause featured to be invisible on
post, page, custom post type
--------------------------+-------------------------
Reporter: bikram_sth | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: General | Version: 5.9.3
Severity: normal | Resolution: worksforme
Keywords: | Focuses:
--------------------------+-------------------------
Changes (by peterwilsoncc):
* status: new => closed
* resolution: => worksforme
* severity: critical => normal
* milestone: Awaiting Review =>
Comment:
This is caused by setting the `rest_base` to `themes`. Both theme and
themes are [https://codex.wordpress.org/Reserved_Terms reserved terms in
WordPress].
To determine if the current theme supports post thumbnails, WordPress
loads the rest endpoint `http://wp-dev.local/wp-
json/wp/v2/themes?context=edit&status=active&_locale=user`.
Setting your CPT's rest endpoint to `themes` causes the endpoint to be
replaced so the editor is unable to determine thumbnail support.
I've closed this ticket as `worksforme` as registering a CPT without using
the reserved term displays the thumbnail panel as expected.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55755#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list