Skip to content

Adjust enable_block_editor to prevent removal of block editor support#136

Merged
Sidsector9 merged 3 commits into10up:developfrom
stormrockwell:fix/disable-editor-support
Oct 17, 2023
Merged

Adjust enable_block_editor to prevent removal of block editor support#136
Sidsector9 merged 3 commits into10up:developfrom
stormrockwell:fix/disable-editor-support

Conversation

@stormrockwell
Copy link
Copy Markdown
Contributor

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 a team and dsawardekar 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
Copy Markdown
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants