]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-wp-admin-bar.php
WordPress 3.4.2
[autoinstalls/wordpress.git] / wp-includes / class-wp-admin-bar.php
index 8ee6d1cf207349af36d9737674ae0cdbed77f161..20fcf405872ae508097fd4a2650719d50a93cf7d 100644 (file)
@@ -196,7 +196,8 @@ class WP_Admin_Bar {
 
        public function render() {
                $root = $this->_bind();
-               $this->_render( $root );
+               if ( $root )
+                       $this->_render( $root );
        }
 
        final protected function _bind() {
@@ -320,7 +321,7 @@ class WP_Admin_Bar {
        }
 
        final protected function _render( $root ) {
-               global $is_IE, $is_iphone;
+               global $is_IE;
 
                // Add browser classes.
                // We have to do this here since admin bar shows on the front end.
@@ -332,7 +333,7 @@ class WP_Admin_Bar {
                                $class .= ' ie8';
                        elseif ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 9' ) )
                                $class .= ' ie9';
-               } elseif ( $is_iphone ) {
+               } elseif ( wp_is_mobile() ) {
                        $class .= ' mobile';
                }
 
@@ -470,4 +471,3 @@ class WP_Admin_Bar {
                do_action( 'add_admin_bar_menus' );
        }
 }
-?>