WordPress.org

Make WordPress Core

Ticket #4241: webkit420.diff

File webkit420.diff, 910 bytes (added by andy, 15 years ago)
  • wp-includes/general-template.php

     
    811811        global $wp_rich_edit, $pagenow;
    812812
    813813        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;
     814                $wp_rich_edit = (
     815                        'true' == get_user_option('rich_editing') &&
     816                        ( ( preg_match('!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'],$match) && $match[1] >= 420 ) || !preg_match('!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT']) ) &&
     817                        'comment.php' != $pagenow && rich_edit_exists()
     818                ) ? true : false;
    815819
    816820        return apply_filters('user_can_richedit', $wp_rich_edit);
    817821}