TinyMCE: better exclusion of Opera mobile, fixes #21416
git-svn-id: https://develop.svn.wordpress.org/trunk@21367 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
48d6a65250
commit
da057a8eb0
|
@ -1754,10 +1754,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 ) {
|
||||
$wp_rich_edit = true;
|
||||
} elseif ( $is_opera ) {
|
||||
if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mobi/') === false && strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini/') === false )
|
||||
} elseif ( $is_gecko || $is_chrome || $is_IE || ( $is_opera && !wp_is_mobile() ) ) {
|
||||
$wp_rich_edit = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -116,7 +116,8 @@ function wp_is_mobile() {
|
|||
|| strpos($_SERVER['HTTP_USER_AGENT'], 'Silk/') !== false
|
||||
|| strpos($_SERVER['HTTP_USER_AGENT'], 'Kindle') !== false
|
||||
|| strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') !== false
|
||||
|| strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false ) {
|
||||
|| strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false
|
||||
|| strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mobi') !== false ) {
|
||||
$is_mobile = true;
|
||||
} else {
|
||||
$is_mobile = false;
|
||||
|
|
Loading…
Reference in New Issue