Slight rearrangements in admin bar render logic. see #18197.

git-svn-id: https://develop.svn.wordpress.org/trunk@19390 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2011-11-21 23:07:54 +00:00
parent 2929a7ee9a
commit 8d57c1e16f
1 changed files with 12 additions and 11 deletions

View File

@ -118,17 +118,6 @@ class WP_Admin_Bar {
'appearance' => 'site-name',
);
// have to do this here since admin bar shows on the front end too
$class = 'nojq nojs';
if ( $is_IE ) {
if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') )
$class .= ' ie7';
elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8') )
$class .= ' ie8';
} elseif ( $is_iphone ) {
$class .= ' mobile';
}
// Link nodes to parents.
foreach ( $this->nodes as $node ) {
@ -153,6 +142,18 @@ class WP_Admin_Bar {
$parent->children->primary[] = $node;
}
// 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' ) )
$class .= ' ie7';
elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 8' ) )
$class .= ' ie8';
} elseif ( $is_iphone ) {
$class .= ' mobile';
}
?>
<div id="wpadminbar" class="<?php echo $class; ?>">
<div class="quicklinks">