Update Fire browser detection. Handle silke mode. Props azaozz, nacin, georgestephanis. fixes #20014
git-svn-id: https://develop.svn.wordpress.org/trunk@20990 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5e0d8e2c95
commit
589a54bbee
@ -1753,10 +1753,7 @@ function user_can_richedit() {
|
|||||||
|
|
||||||
if ( get_user_option( 'rich_editing' ) == 'true' || ! is_user_logged_in() ) { // default to 'true' for logged out users
|
if ( get_user_option( 'rich_editing' ) == 'true' || ! is_user_logged_in() ) { // default to 'true' for logged out users
|
||||||
if ( $is_safari ) {
|
if ( $is_safari ) {
|
||||||
if ( wp_is_mobile() || false !== strpos( $_SERVER['HTTP_USER_AGENT'], '; Silk/' ) )
|
$wp_rich_edit = ! wp_is_mobile() || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 );
|
||||||
$wp_rich_edit = ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 );
|
|
||||||
else
|
|
||||||
$wp_rich_edit = true;
|
|
||||||
} elseif ( $is_gecko || $is_opera || $is_chrome || $is_IE ) {
|
} elseif ( $is_gecko || $is_opera || $is_chrome || $is_IE ) {
|
||||||
$wp_rich_edit = true;
|
$wp_rich_edit = true;
|
||||||
}
|
}
|
||||||
|
@ -113,6 +113,8 @@ function wp_is_mobile() {
|
|||||||
$is_mobile = false;
|
$is_mobile = false;
|
||||||
} elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Mobile') !== false // many mobile devices (all iPhone, iPad, etc.)
|
} elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Mobile') !== false // many mobile devices (all iPhone, iPad, etc.)
|
||||||
|| strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false
|
|| strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false
|
||||||
|
|| 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'], 'BlackBerry') !== false
|
||||||
|| strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false ) {
|
|| strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false ) {
|
||||||
$is_mobile = true;
|
$is_mobile = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user