-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Honor the Disable Visual Editor setting #12000
Conversation
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.
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 );
* 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
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.
LGTM 👍
@gziolo @youknowriad Is there a core Trac ticket for this? |
@danielbachhuber Not that I'm aware of? Is the process to create a trac ticket for each php change? Or do we do git diffs since last updates or something? Just trying to understand the process here? |
Yes. |
@@ -67,6 +67,9 @@ function the_gutenberg_project() { | |||
* @since 0.1.0 | |||
*/ | |||
function gutenberg_menu() { | |||
if ( ! gutenberg_can_edit_post( $post ) ) { | |||
return; | |||
} |
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.
This check is creating a warning and for me it doesn't make sense to check this here at all. It's being addressed in #12053
Trac ticket https://core.trac.wordpress.org/ticket/45375 |
Thanks @youknowriad for shepherding the issue through. Plus creating the trac ticket, I had a mental note to ask about the process for keeping plugin/core in sync. |
This reverts commit 095d18f.
Description
Closes #4634.
Show the plain text editor if the user checks the "Disable the visual editor when writing" option
See #4634
How has this been tested?
From user settings, check option to Disable the visual editor:
Types of changes
Checklist: