Changeset 18963 for trunk/wp-includes/general-template.php
- Timestamp:
- 10/13/2011 06:37:24 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r18907 r18963 1714 1714 */ 1715 1715 function user_can_richedit() { 1716 global $wp_rich_edit, $ pagenow, $is_iphone;1716 global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_iphone, $is_IE; 1717 1717 1718 1718 if ( !isset( $wp_rich_edit) ) { 1719 if ( get_user_option( 'rich_editing' ) == 'true' && 1720 !$is_iphone && // this includes all Safari mobile browsers 1721 ( ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 420 ) || 1722 !preg_match( '!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT'] ) ) 1723 ) { 1724 $wp_rich_edit = true; 1725 } else { 1726 $wp_rich_edit = false; 1719 $wp_rich_edit = false; 1720 1721 if ( get_user_option( 'rich_editing' ) == 'true' ) { 1722 if ( $is_safari ) { 1723 if ( !$is_iphone || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 534 ) ) 1724 $wp_rich_edit = true; 1725 } elseif ( $is_gecko || $is_opera || $is_chrome || $is_IE ) { 1726 $wp_rich_edit = true; 1727 } 1727 1728 } 1728 1729 }
Note: See TracChangeset
for help on using the changeset viewer.