General: use a new function, wp_is_IE(), instead of the $is_IE global in a number of places.
See #37699. Built from https://develop.svn.wordpress.org/trunk@38467 git-svn-id: http://core.svn.wordpress.org/trunk@38408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -391,23 +391,20 @@ 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 ( $is_IE ) {
|
||||
if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 7' ) )
|
||||
if ( wp_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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user