Skip to content
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

Adjust enable_block_editor to prevent removal of block editor support #136

Merged
merged 3 commits into from
Oct 17, 2023

Conversation

stormrockwell
Copy link

Description of the Change

Instead of disabling the block editor if a post type doesn't support the gutenbridge, it will respect its current settings. This fixes an issue with this plugin removing Gutenberg support from post types with the block editor enabled.

Issue: #135

How to test the Change

  1. Create a WordPress website and install this plugin.
  2. Disable support for the "post" post type.

The block editor should still be visible when editing a post.

  1. Enable the "Classic Editor" plugin

The classic editor should be visible with the block editor removed.

  1. Enable plugin support for the "post" post type

The block editor should be visible when editing a post.

Changelog Entry

Changed - Adjust enable_block_editor method only to alter posts that support the gutenbridge.

Credits

Not sure but on the issue @jeffpaul and @dsawardekar confirmed this was an issue and agreed with the initial approach I had so thank you!

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@stormrockwell stormrockwell requested review from dsawardekar and a team as code owners October 2, 2023 19:49
@stormrockwell stormrockwell requested review from Sidsector9 and removed request for a team October 2, 2023 19:49
@jeffpaul jeffpaul added this to the 1.3.0 milestone Oct 2, 2023
Copy link
Member

@Sidsector9 Sidsector9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks and congratulations for your first PR in Convert to Blocks @stormrockwell
The code looks good and tests well 👍

@Sidsector9 Sidsector9 merged commit 4aeacec into 10up:develop Oct 17, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Post types not marked as "Supported Post Types" are forced to use the Classic Editor
3 participants