WordPress.org

Make WordPress Core

Changeset 20990


Ignore:
Timestamp:
06/04/12 16:04:54 (3 years ago)
Author:
ryan
Message:

Update Fire browser detection. Handle silke mode. Props azaozz, nacin, georgestephanis. fixes #20014

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r20419 r20990  
    17541754        if ( get_user_option( 'rich_editing' ) == 'true' || ! is_user_logged_in() ) { // default to 'true' for logged out users 
    17551755            if ( $is_safari ) { 
    1756                 if ( wp_is_mobile() || false !== strpos( $_SERVER['HTTP_USER_AGENT'], '; Silk/' ) ) 
    1757                     $wp_rich_edit = ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 ); 
    1758                 else 
    1759                     $wp_rich_edit = true; 
     1756                $wp_rich_edit = ! wp_is_mobile() || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 ); 
    17601757            } elseif ( $is_gecko || $is_opera || $is_chrome || $is_IE ) { 
    17611758                $wp_rich_edit = true; 
  • trunk/wp-includes/vars.php

    r20417 r20990  
    114114    } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Mobile') !== false // many mobile devices (all iPhone, iPad, etc.) 
    115115        || strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false 
     116        || strpos($_SERVER['HTTP_USER_AGENT'], 'Silk/') !== false 
     117        || strpos($_SERVER['HTTP_USER_AGENT'], 'Kindle') !== false 
    116118        || strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') !== false 
    117119        || strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false ) { 
Note: See TracChangeset for help on using the changeset viewer.