Automattic / Automattic/jetpack
JSON API: Non public Post Types are now visible in the WordPress.com UI
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
#### Steps to reproduce the issue
1. Start from a Jetpack site using non public Post Types. 2 examples are revisions or feedback, from Jetpack's Contact Form module.
2. If you run Jetpack 4.4.2, WordPress.com looks like this:

Only public post types are displayed, as expected. When querying the API, I get only 3 post types:

3. As soon as I apply #5487, more post types appear on WordPress.com:


The Post Types are not returned publicly though, so that's a good thing:

I'm just not sure they should be displayed in the WordPress.com UI, since they're not meant to be edited or added through there.
Let's take the example of the Feedback Post Type; it is registered here:
https://github.com/Automattic/jetpack/blob/branch-4.5/modules/contact-form/grunion-contact-form.php#L122-L153
Although `show_in_rest` and `show_ui ` return `true`, `show_in_admin_bar` and `public` are set to `false`. Maybe we should take this into account on our end?
cc @aduth @lezama @mtias, since you worked on the original PR.
Contributor guide
Assessment
This issue has not been assessed yet.