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

git-svn-id: http://svn.automattic.com/wordpress/trunk@19390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
koopersmith 2011-11-21 23:07:54 +00:00
parent 00823b1deb
commit 46dbae63e6
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">