Editor: change the test in user_can_richedit() to also detect when IE11 is in compatibility mode.

Props ndavison, azaozz.
Fixes #42503 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@42529 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2018-01-18 14:42:34 +00:00
parent 33cd11ecb6
commit 29bc3920be

View File

@ -3081,7 +3081,7 @@ function user_can_richedit() {
if ( $is_safari ) {
$wp_rich_edit = ! wp_is_mobile() || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 );
} elseif ( $is_IE ) {
$wp_rich_edit = ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE ' ) === false );
$wp_rich_edit = ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Trident/7.0;' ) !== false );
} elseif ( $is_gecko || $is_chrome || $is_edge || ( $is_opera && ! wp_is_mobile() ) ) {
$wp_rich_edit = true;
}