From e0942aec0cd81d08c03e4558c096408494269404 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Mon, 17 Dec 2018 17:08:10 +0000 Subject: [PATCH] Block Editor: Expose value of `user_can_richedit()`. In order for the Block Editor to know whether to allow visual editing, it needs to know the value of `user_can_richedit()`. Props youknowriad, danielbachhuber. Merges [43916] into trunk. Fixes #45375. git-svn-id: https://develop.svn.wordpress.org/trunk@44267 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/edit-form-blocks.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php index 040329f8c6..8dc7da46f4 100644 --- a/src/wp-admin/edit-form-blocks.php +++ b/src/wp-admin/edit-form-blocks.php @@ -283,6 +283,7 @@ $editor_settings = array( 'allowedMimeTypes' => get_allowed_mime_types(), 'styles' => $styles, 'imageSizes' => $available_image_sizes, + 'richEditingEnabled' => user_can_richedit(), 'postLock' => $lock_details, 'postLockUtils' => array( 'nonce' => wp_create_nonce( 'lock-post_' . $post->ID ),