Make WordPress Core


Ignore:
Timestamp:
04/10/2012 01:19:30 AM (13 years ago)
Author:
azaozz
Message:

Introduce wp_is_mobile() and use it instead of $is_iphone global, see #20014

File:
1 edited

Legend:

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

    r20326 r20417  
    17471747 */
    17481748function user_can_richedit() {
    1749     global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_iphone, $is_IE;
     1749    global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_IE;
    17501750
    17511751    if ( !isset($wp_rich_edit) ) {
     
    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 ( $is_iphone || false !== strpos( $_SERVER['HTTP_USER_AGENT'], '; Silk/' ) )
     1756                if ( wp_is_mobile() || false !== strpos( $_SERVER['HTTP_USER_AGENT'], '; Silk/' ) )
    17571757                    $wp_rich_edit = ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 );
    17581758                else
Note: See TracChangeset for help on using the changeset viewer.