Skip to content

Commit

Permalink
Revert "Honor the Disable Visual Editor setting (#12000)"
Browse files Browse the repository at this point in the history
This reverts commit 095d18f.
  • Loading branch information
noisysocks committed Nov 21, 2018
1 parent 114c443 commit f1c2f96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 0 additions & 7 deletions gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,6 @@ function gutenberg_pre_init() {
add_filter( 'replace_editor', 'gutenberg_init', 10, 2 );
}

/**
* Enable Gutenberg based on user_can_richedit setting.
* Set gutenberg_can_edit_post based on user setting for disable visual editor.
*/
add_filter( 'gutenberg_can_edit_post_type', 'user_can_richedit', 5 );
add_filter( 'gutenberg_can_edit_post', 'user_can_richedit', 5 );

/**
* Initialize Gutenberg.
*
Expand Down
6 changes: 6 additions & 0 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,12 @@ function gutenberg_editor_scripts_and_styles( $hook ) {
'after'
);

// Ignore Classic Editor's `rich_editing` user option, aka "Disable visual
// editor". Forcing this to be true guarantees that TinyMCE and its plugins
// are available in Gutenberg. Fixes
// https://github.com/WordPress/gutenberg/issues/5667.
add_filter( 'user_can_richedit', '__return_true' );

wp_enqueue_script( 'wp-edit-post' );
wp_enqueue_script( 'wp-format-library' );
wp_enqueue_style( 'wp-format-library' );
Expand Down

0 comments on commit f1c2f96

Please sign in to comment.