From cde183f02950738fc3606a82994703aa69df0529 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 24 Oct 2015 18:13:24 +0000 Subject: [PATCH] Editor: After [33927], make sure `user_can_richedit()` returns true for Microsoft Edge. Props usermrpapa. Fixes #34431. Built from https://develop.svn.wordpress.org/trunk@35384 git-svn-id: http://core.svn.wordpress.org/trunk@35348 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 0ed8491b92..90b7a7d1ea 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -2518,7 +2518,7 @@ function wp_site_icon() { * @return bool */ function user_can_richedit() { - global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_IE; + global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_IE, $is_edge; if ( !isset($wp_rich_edit) ) { $wp_rich_edit = false; @@ -2526,7 +2526,7 @@ function user_can_richedit() { if ( get_user_option( 'rich_editing' ) == 'true' || ! is_user_logged_in() ) { // default to 'true' for logged out users if ( $is_safari ) { $wp_rich_edit = ! wp_is_mobile() || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 ); - } elseif ( $is_gecko || $is_chrome || $is_IE || ( $is_opera && !wp_is_mobile() ) ) { + } elseif ( $is_gecko || $is_chrome || $is_IE || $is_edge || ( $is_opera && !wp_is_mobile() ) ) { $wp_rich_edit = true; } }