Disable the visual editor in iOS. props azaozz, simonwheatley. fixes #13326 for 3.1.

git-svn-id: https://develop.svn.wordpress.org/trunk@15460 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-07-22 17:23:44 +00:00
parent 0734c33eb0
commit 77d5cf7160
1 changed files with 2 additions and 1 deletions

View File

@ -1721,10 +1721,11 @@ function rich_edit_exists() {
* @return bool
*/
function user_can_richedit() {
global $wp_rich_edit, $pagenow;
global $wp_rich_edit, $pagenow, $is_iphone;
if ( !isset( $wp_rich_edit) ) {
if ( get_user_option( 'rich_editing' ) == 'true' &&
!$is_iphone && // this includes all Safari mobile browsers
( ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 420 ) ||
!preg_match( '!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT'] ) )
&& 'comment.php' != $pagenow ) {