-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Filter to make it possible to only add gutenberg links on a per post type basis #2528
Add Filter to make it possible to only add gutenberg links on a per post type basis #2528
Conversation
…ost type basis Right now, Gutenberg is not the right experience for all post types. In order to help encourage testing, we should make it possible to remove the quick action from certain post types. See: https://meta.trac.wordpress.org/ticket/3065#comment:5
I think taking the |
|
||
if ( $can_edit_post && 'trash' !== $post->post_status ) { | ||
if ( $can_edit_post && 'trash' !== $post->post_status && apply_filters( 'gutenberg_add_edit_link_for_post_type', true, $post_type, $post ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want post types other than post and page enabled by default.
I think it should be opt out for now. Plugins such as Gutenberg shouldn't require people to change calls to |
We don't need to do that. In the REST API, the approach was to hook into the global post types and add the necessary attributes to posts and pages. A lot of people are confused about why Gutenberg can be loaded on every CPT by default, which has created some anxiety around it. People feel it is being thrown onto them. This approach does not follow how core does things as well. Many people do not register support for the editor for CPTs, likewise Gutenberg should respect that. Not that this won't happen in the future, but this leads to more confusion a lot of people already hold for Gutenberg at the moment. Do all CPTs on WordCamp use post_content and the editor? |
I think almost all of them register support for the editor, but there are a couple that don't actually use |
Try #2583 if you can, and see if it somewhat works, I would be interested to know. |
Right now, Gutenberg is not the right experience for all post types. In order to help encourage testing, we should make it possible to remove the quick action from certain post types.
This is needed in order to add gutenberg to the WordCamp family of sites.
cc/ @coreymckrill
See: https://meta.trac.wordpress.org/ticket/3065#comment:5