From 782221925a77fa1734a451362b6b9cff30ee4143 Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 22 Jul 2010 17:35:18 +0000 Subject: [PATCH] Disable the visual editor in iOS. props azaozz, simonwheatley. fixes #13326 for 3.0.1. git-svn-id: http://svn.automattic.com/wordpress/branches/3.0@15461 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index ea88d1e9a9..333d2642a7 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -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 ) {