From 4ca78e553df81cadd0b7009c8148b56dfbeb613c Mon Sep 17 00:00:00 2001 From: azaozz Date: Mon, 30 Jul 2012 00:14:43 +0000 Subject: [PATCH] TinyMCE: don't load in Opera Mobile as it doesn't support contentEditable yet, fixes #21416 git-svn-id: http://core.svn.wordpress.org/trunk@21361 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 0419b2b6cc..a8ef8e289c 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -1754,8 +1754,11 @@ 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_opera || $is_chrome || $is_IE ) { + } elseif ( $is_gecko || $is_chrome || $is_IE ) { $wp_rich_edit = true; + } elseif ( $is_opera ) { + if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mobi/') === false && strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini/') === false ) + $wp_rich_edit = true; } } }