General: use a new function, wp_is_IE(), instead of the $is_IE global in a number of places.

See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38467 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2016-08-31 06:41:07 +00:00
parent 97ea98f145
commit f9278a9364
9 changed files with 27 additions and 32 deletions
+2 -3
View File
@@ -2904,12 +2904,11 @@ function wp_dependencies_unique_hosts() {
* @global bool $is_opera
* @global bool $is_safari
* @global bool $is_chrome
* @global bool $is_IE
*
* @return bool
*/
function user_can_richedit() {
global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_IE, $is_edge;
global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_edge;
if ( !isset($wp_rich_edit) ) {
$wp_rich_edit = false;
@@ -2917,7 +2916,7 @@ function user_can_richedit() {
if ( get_user_option( 'rich_editing' ) == 'true' || ! is_user_logged_in() ) { // default to 'true' for logged out users
if ( $is_safari ) {
$wp_rich_edit = ! wp_is_mobile() || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 );
} elseif ( $is_gecko || $is_chrome || $is_IE || $is_edge || ( $is_opera && !wp_is_mobile() ) ) {
} elseif ( $is_gecko || $is_chrome || wp_is_IE() || $is_edge || ( $is_opera && !wp_is_mobile() ) ) {
$wp_rich_edit = true;
}
}