Make WordPress Core

Changeset 5443


Ignore:
Timestamp:
05/11/2007 01:00:30 AM (17 years ago)
Author:
rob1n
Message:

Let WebKit 420 and above in for TinyMCE. fixes #4241 for 2.2

File:
1 edited

Legend:

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

    r5248 r5443  
    810810function user_can_richedit() {
    811811    global $wp_rich_edit, $pagenow;
    812 
    813     if ( !isset($wp_rich_edit) )
    814         $wp_rich_edit = ( 'true' == get_user_option('rich_editing') && !preg_match('!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT']) && 'comment.php' != $pagenow && rich_edit_exists() ) ? true : false;
     812   
     813    if ( !isset( $wp_rich_edit) ) {
     814        if ( get_user_option( 'rich_editing' ) == 'true' &&
     815            ( ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 420 ) ||
     816                !preg_match( '!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT'] ) ) ) {
     817            $wp_rich_edit = true;
     818        } else {
     819            $wp_rich_edit = false;
     820        }
     821    }
    815822
    816823    return apply_filters('user_can_richedit', $wp_rich_edit);
Note: See TracChangeset for help on using the changeset viewer.