Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Honor the Disable Visual Editor setting (#12000)
* Do not override user_can_richedit option * Add checks for user_can_richedit() to show plain-text editor Honors the user setting for `Disable the visual editor when writing` If the user checks the option to disable visual editor: - Returns from Gutenberg init - Removes the links to Classic Editor in post list - Removes the Gutenberg menu item When editing a post, it will load the plain text editor. * Update user_can_richedit added to filter Moves the user_can_richedit to attach just on the filters and not spread through out different fucntions. add_filter( 'gutenberg_can_edit_post_type', 'user_can_richedit', 5 ); add_filter( 'gutenberg_can_edit_post', 'user_can_richedit', 5 ); add_filter( 'use_block_editor_for_post', 'user_can_richedit', 5 ); * Update with just plugin changes * Don't include core function use_block_editor_for_post * Don't show Gutenberg menu in admin sidebar, since Demo link will not load block editor, still plain text editor * Fix comment
- Loading branch information