General: revert [38467], wp_is_IE() should not exist.

See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38468 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2016-08-31 15:21:04 +00:00
parent f9278a9364
commit 683d828d42
9 changed files with 32 additions and 27 deletions

View File

@@ -391,20 +391,23 @@ class WP_Admin_Bar {
}
/**
*
* @global bool $is_IE
* @param object $root
*/
final protected function _render( $root ) {
global $is_IE;
// Add browser classes.
// We have to do this here since admin bar shows on the front end.
$class = 'nojq nojs';
if ( wp_is_IE() ) {
if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 7' ) ) {
if ( $is_IE ) {
if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 7' ) )
$class .= ' ie7';
} elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 8' ) ) {
elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 8' ) )
$class .= ' ie8';
} elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 9' ) ) {
elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 9' ) )
$class .= ' ie9';
}
} elseif ( wp_is_mobile() ) {
$class .= ' mobile';
}

View File

@@ -2904,11 +2904,12 @@ 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_edge;
global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_IE, $is_edge;
if ( !isset($wp_rich_edit) ) {
$wp_rich_edit = false;
@@ -2916,7 +2917,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 || wp_is_IE() || $is_edge || ( $is_opera && !wp_is_mobile() ) ) {
} elseif ( $is_gecko || $is_chrome || $is_IE || $is_edge || ( $is_opera && !wp_is_mobile() ) ) {
$wp_rich_edit = true;
}
}

View File

@@ -2896,11 +2896,15 @@ function the_comments_pagination( $args = array() ) {
* Retrieves the Press This bookmarklet link.
*
* @since 2.6.0
*
* @global bool $is_IE Whether the browser matches an Internet Explorer user agent.
*/
function get_shortcut_link() {
global $is_IE;
$link = '';
if ( wp_is_IE() ) {
if ( $is_IE ) {
/*
* Return the old/shorter bookmarklet code for MSIE 8 and lower,
* since they only support a max length of ~2000 characters for

View File

@@ -133,12 +133,14 @@ function wp_underscore_video_template() {
* Prints the templates used in the media manager.
*
* @since 3.5.0
*
* @global bool $is_IE
*/
function wp_print_media_templates() {
global $is_IE;
$class = 'media-modal wp-core-ui';
if ( wp_is_IE() && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false ) {
if ( $is_IE && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false )
$class .= ' ie7';
}
?>
<!--[if lte IE 8]>
<style>

View File

@@ -139,15 +139,3 @@ function wp_is_mobile() {
return $is_mobile;
}
/**
* @since 4.7.0
*
* @global bool $is_IE Whether the current user agent is Internet Explorer
*
* @return bool Return the value of the $is_IE global.
*/
function wp_is_IE() {
global $is_IE;
return $is_IE;
}