<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[15671] trunk: Admin bar, first pass.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/15671">15671</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-09-27 20:26:36 +0000 (Mon, 27 Sep 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Admin bar, first pass. see <a href="http://trac.wordpress.org/ticket/14772">#14772</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesmsfunctionsphp">trunk/wp-includes/ms-functions.php</a></li>
<li><a href="#trunkwpincludesuserphp">trunk/wp-includes/user.php</a></li>
<li><a href="#trunkwpsettingsphp">trunk/wp-settings.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/wp-includes/admin-bar/</li>
<li><a href="#trunkwpincludesadminbaradminbarclassphp">trunk/wp-includes/admin-bar/admin-bar-class.php</a></li>
<li><a href="#trunkwpincludesadminbaradminbarcssphp">trunk/wp-includes/admin-bar/admin-bar-css.php</a></li>
<li><a href="#trunkwpincludesadminbaradminbardebugphp">trunk/wp-includes/admin-bar/admin-bar-debug.php</a></li>
<li><a href="#trunkwpincludesadminbaradminbarsuperadminphp">trunk/wp-includes/admin-bar/admin-bar-superadmin.php</a></li>
<li><a href="#trunkwpincludesadminbarphp">trunk/wp-includes/admin-bar.php</a></li>
<li><a href="#trunkwpincludesimagesadminbarspritertlpng">trunk/wp-includes/images/admin-bar-sprite-rtl.png</a></li>
<li><a href="#trunkwpincludesimagesadminbarspritepng">trunk/wp-includes/images/admin-bar-sprite.png</a></li>
<li><a href="#trunkwpincludesimageswpminibluepng">trunk/wp-includes/images/wpmini-blue.png</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesadminbaradminbarclassphp"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/admin-bar/admin-bar-class.php (0 => 15671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/admin-bar/admin-bar-class.php                                (rev 0)
+++ trunk/wp-includes/admin-bar/admin-bar-class.php        2010-09-27 20:26:36 UTC (rev 15671)
</span><span class="lines">@@ -0,0 +1,168 @@
</span><ins>+&lt;?php
+class WP_Admin_Bar {
+        var $user;
+        var $menu;
+        var $need_to_change_locale = false;
+        var $changed_locale = false;
+
+        function WP_Admin_Bar() {
+                global $current_user, $blog_id;
+
+                $this-&gt;user = new stdClass;
+                $this-&gt;menu = new stdClass;
+
+                /* Populate settings we need for the menu based on the current user. */
+                $this-&gt;user-&gt;blogs = get_ordered_blogs_of_user( $current_user-&gt;id );
+                if ( is_multisite() ) {
+                        $this-&gt;user-&gt;active_blog = get_active_blog_for_user( $current_user-&gt;id );
+                        $this-&gt;user-&gt;domain = ( $this-&gt;user-&gt;active_blog == 'username only' ) ? get_dashboard_blog() : trailingslashit( get_home_url( $this-&gt;user-&gt;active_blog-&gt;blog_id ) );
+                        $this-&gt;user-&gt;account_domain = $this-&gt;user-&gt;domain;
+                } else {
+                        $this-&gt;user-&gt;active_blog = $this-&gt;user-&gt;blogs[$blog_id];
+                        $this-&gt;user-&gt;domain = home_url();
+                        $this-&gt;user-&gt;account_domain = home_url();
+                }
+                $this-&gt;user-&gt;locale = get_locale();
+        }
+
+        function add_menu( $args = array() ) {
+                $defaults = array(
+                        'title' =&gt; false,
+                        'href' =&gt; false,
+                        'parent' =&gt; false, // false for a root menu, pass the ID value for a submenu of that menu.
+                        'id' =&gt; false, // defaults to a sanitized title value.
+                        'meta' =&gt; false // array of any of the following options: array( 'html' =&gt; '', 'class' =&gt; '', 'onclick' =&gt; '', target =&gt; '' );
+                );
+
+                $r = wp_parse_args( $args, $defaults );
+                extract( $r, EXTR_SKIP );
+
+                if ( empty( $title ) )
+                        return false;
+
+                /* Make sure we have a valid ID */
+                if ( empty( $id ) )
+                        $id = esc_attr( sanitize_title( trim( $title ) ) );
+
+                if ( !empty( $parent ) ) {
+                        /* Add the menu to the parent item */
+                        $child = array(
+                                'id' =&gt; $id,
+                                'title' =&gt; $title,
+                                'href' =&gt; $href
+                        );
+
+                        if ( !empty( $meta ) )
+                                $child['meta'] = $meta;
+
+                        $this-&gt;add_node( $parent, $this-&gt;menu, $child );
+                } else {
+                        /* Add the menu item */
+                        $this-&gt;menu-&gt;{$id} = array(
+                                'title' =&gt; $title,
+                                'href' =&gt; $href
+                        );
+
+                        if ( !empty( $meta ) )
+                                $this-&gt;menu-&gt;{$id}['meta'] = $meta;
+                }
+        }
+
+        function remove_menu( $id ) {
+                return $this-&gt;remove_node( $id, $this-&gt;menu );
+        }
+        
+        function render() {
+        ?&gt;
+                &lt;div id=&quot;wpadminbar&quot; class=&quot;snap_nopreview no-grav&quot;&gt;
+                        &lt;div class=&quot;quicklinks&quot;&gt;
+                                &lt;ul&gt;
+                                        &lt;?php foreach ( (array) $this-&gt;menu as $id =&gt; $menu_item ) : ?&gt;
+                                                &lt;?php $this-&gt;recursive_render( $id, $menu_item ) ?&gt;
+                                        &lt;?php endforeach; ?&gt;
+                                &lt;/ul&gt;
+                        &lt;/div&gt;
+
+                        &lt;div id=&quot;adminbarsearch-wrap&quot;&gt;
+                                &lt;form action=&quot;&lt;?php echo home_url(); ?&gt;&quot; method=&quot;get&quot; id=&quot;adminbarsearch&quot;&gt;
+                                        &lt;input class=&quot;adminbar-input&quot; name=&quot;s&quot; id=&quot;s&quot; type=&quot;text&quot; value=&quot;&lt;?php esc_attr_e( 'Search' ); ?&gt;&quot; maxlength=&quot;150&quot; onfocus=&quot;this.value=(this.value=='&lt;?php esc_attr_e( 'Search' ); ?&gt;') ? '' : this.value;&quot; onblur=&quot;this.value=(this.value=='') ? '&lt;?php esc_attr_e( 'Search' ); ?&gt;' : this.value;&quot; /&gt; &lt;button type=&quot;submit&quot; class=&quot;adminbar-button&quot;&gt;&lt;span&gt;&lt;?php _e('Search'); ?&gt;&lt;/span&gt;&lt;/button&gt;
+                                &lt;/form&gt;
+                        &lt;/div&gt;
+                &lt;/div&gt;
+
+                &lt;?php
+                /* Wipe the menu, might reduce memory usage, but probably not. */
+                $this-&gt;menu = null;
+        }
+
+        /* Helpers */
+        function recursive_render( $id, &amp;$menu_item ) { ?&gt;
+                &lt;?php $menuclass = ( !empty( $menu_item['children'] ) ) ? 'menupop ' : ''; ?&gt;
+
+                &lt;li class=&quot;&lt;?php echo $menuclass . &quot;ab-$id&quot; ?&gt;&lt;?php if ( !empty( $menu_item['meta']['class'] ) ) : ?&gt;&lt;?php echo ' ' . $menu_item['meta']['class'] ?&gt;&lt;?php endif; ?&gt;&quot;&gt;
+                        &lt;a href=&quot;&lt;?php echo strip_tags( $menu_item['href'] ) ?&gt;&quot;&lt;?php if ( !empty( $menu_item['meta']['onclick'] ) ) :?&gt;onclick=&quot;&lt;?php echo $menu_item['meta']['onclick'] ?&gt;&quot;&lt;?php endif; ?&gt;&lt;?php if ( !empty( $menu_item['meta']['target'] ) ) :?&gt;target=&quot;&lt;?php echo $menu_item['meta']['target'] ?&gt;&quot;&lt;?php endif; ?&gt;&gt;&lt;?php if ( !empty( $menuclass ) ) : ?&gt;&lt;span&gt;&lt;?php endif; ?&gt;&lt;?php echo $menu_item['title'] ?&gt;&lt;?php if ( !empty( $menuclass ) ) : ?&gt;&lt;/span&gt;&lt;?php endif; ?&gt;&lt;/a&gt;
+
+                        &lt;?php if ( !empty( $menu_item['children'] ) ) : ?&gt;
+                        &lt;ul&gt;
+                                &lt;?php foreach ( $menu_item['children'] as $child_id =&gt; $child_menu_item ) : ?&gt;
+                                        &lt;?php $this-&gt;recursive_render( $child_id, $child_menu_item ); ?&gt;
+                                &lt;?php endforeach; ?&gt;
+                        &lt;/ul&gt;
+                        &lt;?php endif; ?&gt;
+
+                        &lt;?php if ( !empty( $menu_item['meta']['html'] ) ) : ?&gt;
+                                &lt;?php echo $menu_item['meta']['html']; ?&gt;
+                        &lt;?php endif; ?&gt;
+                &lt;/li&gt;&lt;?php
+        }
+
+        function add_node( $parent_id, &amp;$menu, $child ) {
+                foreach( $menu as $id =&gt; &amp;$menu_item ) {
+                        if ( $parent_id == $id ) {
+                                $menu-&gt;{$parent_id}['children']-&gt;{$child['id']} = $child;
+                                $child = null;
+                                return true;
+                        }
+
+                        if ( !empty( $menu-&gt;{$id}['children'] ) )
+                                $this-&gt;add_node( $parent_id, $menu-&gt;{$id}['children'], $child );
+                }
+                $child = null;
+
+                return false;
+        }
+
+        function remove_node( $id, &amp;$menu ) {
+                foreach( $menu as $menu_item_id =&gt; &amp;$menu_item ) {
+                        if ( $menu_item_id == $id ) {
+                                $menu_item = null;
+                                return true;
+                        }
+
+                        if ( !empty( $menu-&gt;{$menu_item_id}['children'] ) )
+                                $this-&gt;remove_node( $id, $menu-&gt;{$menu_item_id}['children'] );
+                }
+
+                return false;
+        }
+
+        function load_user_locale_translations() {
+                $this-&gt;need_to_change_locale = ( get_locale() != $this-&gt;user-&gt;locale );
+                if ( !$this-&gt;need_to_change_locale ) return;
+                $this-&gt;previous_translations = get_translations_for_domain( 'default' );
+                $this-&gt;adminbar_locale_filter = lambda( '$_', '$GLOBALS[&quot;wp_admin_bar&quot;]-&gt;user-&gt;locale;' );
+                unload_textdomain( 'default' );
+                add_filter( 'locale', $this-&gt;adminbar_locale_filter );
+                load_default_textdomain();
+                $this-&gt;changed_locale = true;
+        }
+
+        function unload_user_locale_translations() {
+                global $l10n;
+                if ( !$this-&gt;changed_locale ) return;
+                remove_filter( 'locale', $this-&gt;adminbar_locale_filter );
+                $l10n['default'] = &amp;$this-&gt;previous_translations;
+
+        }
+}
+?&gt;
</ins><span class="cx">Property changes on: trunk/wp-includes/admin-bar/admin-bar-class.php
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:eol-style
</span><span class="cx">   + native
</span></span></pre></div>
<a id="trunkwpincludesadminbaradminbarcssphp"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/admin-bar/admin-bar-css.php (0 => 15671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/admin-bar/admin-bar-css.php                                (rev 0)
+++ trunk/wp-includes/admin-bar/admin-bar-css.php        2010-09-27 20:26:36 UTC (rev 15671)
</span><span class="lines">@@ -0,0 +1,453 @@
</span><ins>+&lt;?php 
+        header( 'Content-type: text/css' );
+        $proto = ( empty( $_GET['p'] ) ) ? 'http://' : 'https://';
+        $text_direction =  $_GET['td'];
+        if ( 'ltr' == $text_direction || empty( $_GET['td'] ) )
+                $sprite = $_GET['inc'] . 'images/admin-bar-sprite.png?d=08102010';
+        else
+                $sprite = $_GET['inc'] . 'images/admin-bar-sprite-rtl.png?d=08102010';
+?&gt;
+
+#wpadminbar { direction:ltr; background:#666 url(&lt;?php echo $sprite; ?&gt;) 0 -222px repeat-x; color:#ddd; font:12px Arial, Helvetica, sans-serif; height:28px; left:0; margin:0; position:fixed; top:0; width:100%; z-index:99999; min-width: 960px; }
+#wpadminbar ul, #wpadminbar ul li { position: relative; z-index: 99999; }
+#wpadminbar ul li img { vertical-align: middle !important; margin-right: 8px !important; border: none !important; padding: 0 !important; }
+#wpadminbar .quicklinks &gt; ul &gt; li &gt; a { border-right: 1px solid #686868; border-left: 1px solid #808080; }
+#wpadminbar .quicklinks &gt; ul &gt; li.ab-subscriptions &gt; a, #wpadminbar .quicklinks &gt; ul &gt; li:last-child &gt; a { border-right: none; }
+#wpadminbar .quicklinks &gt; ul &gt; li.hover &gt; a { border-left-color: #707070; }
+#wpadminbar a { outline: none; }
+#wpadminbar .avatar {border:1px solid #999 !important;padding:0 !important;margin:-3px 5px 0 0 !important;vertical-align:middle;float:none;display:inline !important; }
+#wpadminbar .menupop ul li a {color:#555 !important;text-shadow:none;font-weight:normal;white-space:nowrap;}
+#wpadminbar .menupop a &gt; span {background:url(&lt;?php echo $sprite; ?&gt;) 100% 100.4% no-repeat;padding-right:.8em;line-height: 28px;}
+#wpadminbar .menupop ul li a &gt; span { display: block; background:url(&lt;?php echo $sprite; ?&gt;) 100% 97.2% no-repeat;padding-right:1.5em;line-height: 28px;}
+#wpadminbar .menupop ul li a span#awaiting-mod { display: inline; background: #aaa; color: #fff; padding: 1px 5px; font-size: 10px; font-family: verdana; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }
+#wpadminbar .menupop ul li a:hover span#awaiting-mod { background: #fff; color: #888; }
+#wpadminbar .menupop ul {-moz-box-shadow:0 4px 8px rgba(0,0,0,0.1);-webkit-box-shadow:0 4px 8px rgba(0,0,0,0.1);background:#fff;display:none;position:absolute;border:1px solid #dfdfdf;border-top:none !important;float:none}
+html&gt;body #wpadminbar .menupop ul {background:rgba(255,255,255,0.97);border-color:rgba(0,0,0,0.1);}
+#wpadminbar .menupop.ab-my-account ul, #wpadminbar .menupop.ab-my-dash ul, #wpadminbar .menupop.ab-new-post ul {min-width:140px}
+#wpadminbar .menupop li {float:none;margin:0;padding:0;background-image:none;}
+#wpadminbar .quicklinks a {border:none;color:#ddd !important;text-shadow:#555 0px -1px 0px;display:block;font:13px Arial, Helvetica, sans-serif;font-weight:normal;letter-spacing:normal;padding:0 0.85em;line-height:28px;text-decoration:none !important;}
+#wpadminbar .quicklinks a:hover {text-shadow:#333 0px -1px 0px;}
+#wpadminbar li.ab-privacy { float: right; background: #333; }
+#wpadminbar li.ab-privacy &gt; a &gt; span { background: none; padding: 0;  }
+#wpadminbar li.ab-privacy span#priv-icon { display: block; text-indent: -999em; background:url(&lt;?php echo $sprite; ?&gt;) 40% 59.7% no-repeat; padding: 0; width: 13px; margin-right: -3px; }
+
+#wpadminbar li.ab-sadmin { float: right; background: #555 }
+#wpadminbar li.ab-sadmin ul, #wpadminbar li.ab-privacy ul { right: 0; float: right; }
+#wpadminbar li.ab-sadmin &gt; a { font-size: 11px !important; padding: 0 7px !important; border: none !important; border-left: 1px solid #666 !important; }
+
+#wpadminbar li.ab-sadmin ul a, #wpadminbar li.ab-privacy a { border-right: none !important; border-left: none !important; }
+#wpadminbar li.ab-sadmin ul li { right: 0; float: right; text-align: left; width: 100%; }
+#wpadminbar li.ab-sadmin ul li a { padding-left: 1.75em; } 
+#wpadminbar li.ab-sadmin ul li a &gt; span { background:url(&lt;?php echo $sprite; ?&gt;) 0% 101.8% no-repeat;padding-left: 1.25em; margin-left: -1.25em; line-height: 28px; padding-right: 0 !important; }
+#wpadminbar li a.loading { background: url(&lt;/ajax-loader.gif) 10px 50% no-repeat !important; padding-left: 29px; }
+#wpadminbar li.subscribed a strong { background:url(&lt;?php echo $sprite; ?&gt;) 32% 59.8% no-repeat !important; text-indent: -999em; overflow: hidden; padding: 0 16px 0 0; height: 28px; display: block; float: left; margin-right: 2px; }
+
+#wpadminbar li:hover {background: #555 url(&lt;?php echo $sprite; ?&gt;) 0 -282px repeat-x;}
+#wpadminbar li li:hover { color:#fff !important; background: #888 url(&lt;?php echo $sprite; ?&gt;) 0 -222px repeat-x !important;text-shadow: #666 0px -1px 0px;}
+#wpadminbar li li:hover &gt; a { color:#fff !important; }
+.quicklinks ul {list-style:none;margin:0;padding:0;text-align:left}
+.quicklinks ul li {float:left;margin:0}
+
+#adminbarlogin {float:left;display:inline;}
+
+#adminbarsearch {float:right; }
+#adminbarsearch {height: 18px;padding: 3px;}
+#adminbarsearch * {color: #555;font-size:12px;}
+#adminbarsearch label, #adminbarsearch a { height: 28px; color: #ccc; display:block;float:left;padding:3px 4px;text-shadow:0px -1px 0px #444;}
+#adminbarsearch a {text-decoration:underline;}
+#adminbarsearch a:hover {color:#fff;}
+
+#wpadminbar li.ab-me:hover, #wpadminbar li.ab-blog:hover { background:none;}
+#wpadminbar li.ab-me &gt; a, #wpadminbar li.ab-blog &gt; a { line-height: 18px !important; border: none !important; background:url(&lt;?php echo $sprite; ?&gt;) 100% 59.8% no-repeat; height: 28px; padding: 0 1.15em 0 0.7em; }
+#wpadminbar li.ab-me &gt; a.hover, #wpadminbar li.ab-blog &gt; a.hover { background-position: 67% 59.8%; }
+#wpadminbar li.ab-me img.avatar, #wpadminbar li.ab-blog img.avatar { margin: 4px 0 0 0 !important; vertical-align: middle; background: #eee; width: 16px !important; height: 16px !important; }
+#wpadminbar li.ab-my-account a, #wpadminbar li.ab-bloginfo a { border-left: none !important; padding-left: 0.7em !important; margin-top: 0 !important; }
+#wpadminbar li.ab-my-account &gt; ul, #wpadminbar li.ab-bloginfo &gt; ul { left: -7px; }
+#wpadminbar ul li img { width: 16px !important; height: 16px !important; }
+
+#wpadminbar ul li a strong.count { text-shadow: none; background: #ddd; color: #555; margin-left: 5px; padding: 1px 6px; top: -1px; position: relative; font-size: 9px; -moz-border-radius: 7px; -webkit-border-radius: 7px; border-radius: 7px; font-weight: normal }
+
+#wpadminbar #q {
+        line-height:normal !important;
+        width:140px !important;
+        margin-top:0px !important;
+}
+.adminbar-input {
+        display:block !important;
+        float:left !important;
+        font:12px Arial,Helvetica,sans-serif !important;
+        border:1px solid #626262 !important;
+        padding:2px 3px !important;
+        margin-right:3px !important;
+        background:#ddd url(&lt;?php echo $sprite; ?&gt;) top left no-repeat !important;
+        -webkit-border-radius:0 !important;
+        -khtml-border-radius:0 !important;
+        -moz-border-radius:0 !important;
+        border-radius:0 !important;
+        outline:none;
+        text-shadow:0 1px 0 #fff;
+}
+button.adminbar-button {
+        position:relative;
+        border:0;
+        cursor:pointer;
+        overflow:visible;
+        margin:0 !important;
+        float:left;
+        background:url(&lt;?php echo $sprite; ?&gt;) right -107px no-repeat;
+        padding:0 14px 0 0;
+        text-align:center;
+}
+button.adminbar-button span {
+        position:relative;
+        display:block;
+        white-space:nowrap;
+        height:19px;
+        background:url(&lt;?php echo $sprite; ?&gt;) left -69px no-repeat;
+        padding:3px 0 0 14px;
+        font:12px Arial,Helvetica,sans-serif !important;
+        font-weight:bold !important;
+        color:#444 !important;
+        text-shadow:0px 1px 0px #eee !important;
+}
+button.adminbar-button:active {
+        background-position:right -184px !important;
+        text-shadow:0px 1px 0px #eee !important;
+}
+button.adminbar-button:hover span {
+        color:#000 !important;
+}
+button.adminbar-button:active span {
+        background-position:left -146px !important;
+}
+button.adminbar-button::-moz-focus-inner {
+        border:none;
+}
+@media screen and (-webkit-min-device-pixel-ratio:0) {
+        button.adminbar-button span {
+                margin-top: -1px;
+        }
+}
+
+&lt;?php if ( 'rtl' == $text_direction ) : ?&gt;
+        #wpadminbar {
+                direction:rtl;
+                font-family: Tahoma, Arial ,sans-serif;
+                right:0;
+                left:auto;
+        }
+        #wpadminbar div, #wpadminbar ul, #wpadminbar ul li {
+                min-height: 0;
+        }
+        #wpadminbar ul li img {  margin-left: 8px !important; margin-right: 0 !important; }
+        #wpadminbar .quicklinks &gt; ul &gt; li &gt; a { border-left: 1px solid #686868; border-right: 1px solid #808080;}
+        #wpadminbar .quicklinks &gt; ul &gt; li.ab-subscriptions &gt; a, #wpadminbar .quicklinks &gt; ul &gt; li:last-child &gt; a { border-left: none; border-right: 1px solid #808080;}
+        #wpadminbar .quicklinks &gt; ul &gt; li.hover &gt; a { border-right-color: #707070; border-left-color: #686868; }
+        #wpadminbar .avatar {margin: -3px  0 0 5px !important; float:none;  }
+        #wpadminbar .menupop a &gt; span {background-position: 0 100.4%; padding-left:.8em;}
+        #wpadminbar .menupop ul li a &gt; span { background-position: 0% 97.2%; padding-right:0;padding-left:1.5em }
+        #wpadminbar .menupop ul {right: 0; width:100%; min-width:150px;}
+        #wpadminbar .ab-my-account ul { width:200px;}
+        #wpadminbar .ab-my-blogs ul { width:300px;}
+        #wpadminbar .ab-my-blogs ul ul { width:200px;}
+        #wpadminbar .ab-subscribe ul { width:150px;}
+        #wpadminbar .ab-bloginfo ul { width:200px;}
+        #wpadminbar .ab-subscribe ul { width:150px;}
+        #wpadminbar .ab-subscriptions ul { width:200px;}
+        #wpadminbar .menupop ul li {width:auto}
+        #wpadminbar .quicklinks a {font-family: Tahoma, Arial, Helvetica, sans-serif;}
+        #wpadminbar li.ab-privacy { float: left; }
+        #wpadminbar li.ab-privacy span#priv-icon { text-indent: 999em; background-position: 60% 59.7%; padding: 0; margin-right: 0; margin-left: -3px;}
+
+        #wpadminbar li.ab-sadmin { float: left;  }
+        #wpadminbar li.ab-sadmin ul, #wpadminbar li.ab-privacy ul { right: auto; left: 0; float: left; }
+        #wpadminbar li.ab-sadmin &gt; a { border-right: 1px solid #666 !important; border-left:none !important;}
+
+        #wpadminbar li.ab-sadmin ul a, #wpadminbar li.ab-privacy a { border-right: none !important; border-left: none !important; }
+        #wpadminbar li.ab-sadmin ul li { left: 0; right:auto; float: left; text-align: right;  }
+
+
+        #wpadminbar li.ab-sadmin ul li a { padding-right: 1.75em; padding-left: 0 } 
+        #wpadminbar li.ab-sadmin ul li a &gt; span { background-position: 100% 101.8%; padding-right: 1.25em !important; padding-left: 0 !important; margin-right: -1.25em; margin-left: 0; }
+        #wpadminbar li a.loading { background-position: right 50% !important; padding-right: 29px; padding-left: 0;}
+        #wpadminbar li.subscribed a strong { background-position: 68% 59.8% !important;  padding: 0 0 0 16px; float: right; margin-left: 2px; }
+
+
+        .quicklinks ul {text-align:right}
+        .quicklinks ul li {float:right;}
+
+        #adminbarlogin {float:right;}
+
+        #adminbarsearch {display:none;}
+        #adminbarsearch label, #adminbarsearch a { float:right;}
+
+        #wpadminbar li.ab-me &gt; a, #wpadminbar li.ab-blog &gt; a { background-position:0% 59.8%; padding: 0 0.7em 0 1.15em; }
+        #wpadminbar li.ab-me &gt; a.hover, #wpadminbar li.ab-blog &gt; a.hover { background-position: 33% 59.8%; }
+        #wpadminbar li.ab-my-account a, #wpadminbar li.ab-bloginfo a { border-right: none !important; padding-right: 0.7em !important;  }
+        #wpadminbar li.ab-my-account &gt; ul, #wpadminbar li.ab-bloginfo &gt; ul { right: -7px; left:auto;}
+
+        #wpadminbar ul li a strong.count { margin-right: 5px; margin-left: 0; position:static}
+
+
+        .adminbar-input {
+                float:right !important;
+                font-family: Tahoma, Arial,Helvetica,sans-serif !important;
+                margin-right:3px !important;
+                margin-left:0 !important;
+                background-position: right top !important;
+        }
+        button.adminbar-button {
+                float:right;
+                background-position: left -107px;
+                padding:0 0 0 14px;
+        }
+        button.adminbar-button span {
+                background-position: right -69px;
+                padding:3px 14px 0 0;
+                font-family: Tahoma, Arial,Helvetica,sans-serif !important;
+        }
+        button.adminbar-button:active {
+                background-position:left -184px !important;
+        }
+        button.adminbar-button:active span {
+                background-position:right -146px !important;
+        }
+&lt;?php
+endif;
+
+$current_theme = str_replace( '+', ' ', $_GET['t'] );
+$is_admin = $_GET['a'];
+$is_super_admin = $_GET['sa'];
+
+if ( ( empty($_GET['nobump']) || $is_admin ) &amp;&amp; !strpos( $_SERVER['REQUEST_URI'], 'media-upload.php' ) ) : ?&gt;
+        body { padding-top: 28px !important; }
+&lt;?php endif; ?&gt;
+
+&lt;?php if ( in_array( $current_theme, array('H3', 'H4', 'The Journalist v1.9') ) ) { ?&gt;
+        body { padding-top: 28px; background-position: 0px 28px; }
+&lt;?php } ?&gt;
+
+&lt;?php if ( $is_super_admin ) : ?&gt;
+        #querylist {
+                font-family: Arial, Tahoma, sans-serif;
+                display: none;
+                position: absolute;
+                top: 50px;
+                left: 50px;
+                right: 50px;
+                background: #fff;
+                padding: 20px;
+                -moz-box-shadow: 0 0 15px #888;
+                -webkit-box-shadow: 0 0 15px #888;
+                box-shadow: 0 0 15px #888;
+                z-index: 99999;
+                border: 10px solid #f0f0f0;
+                color: #000;
+                line-height: 150% !important;
+        }
+        #querylist pre {
+                font-size: 12px;
+                padding: 10px;
+        }
+        
+        #querylist h1 {
+                font-family: georgia, times, serif;
+                text-align: center;
+                font-size: 24px;
+                padding: 20px 5px;
+                background: #eee;
+                color: #555;
+                margin: 0;
+        }
+        #querylist div#debug-status {
+                background: #ccc;
+                color: #fff;
+                overflow: hidden;
+                height: 21px;
+                font-size: 14px;
+                font-family: georgia, times, serif;
+                padding: 7px 15px;
+        }
+        #querylist .left { float: left; }
+        #querylist .right { float: right; }
+        
+        #querylist h1, #querylist h2, #querylist h3 {
+                font-weight: normal;
+        }
+        
+        #querylist ul.debug-menu-links {
+                clear: left;
+                background: #ccc;
+                padding: 10px 15px 0;
+                overflow: hidden;
+                list-style: none;
+                margin: 0;
+                padding: 0 0 0 15px;
+        }
+                #querylist ul.debug-menu-links li {
+                        float: left;
+                        margin-right: 10px;
+                        margin-bottom: 0 !important;
+                }
+                
+                #querylist ul.debug-menu-links li a {
+                        outline: none;
+                        display: block;
+                        padding: 5px 9px;
+                        margin-right: 0;
+                        background: #bbb;
+                        color: #fff !important;
+                        text-decoration: none !important;
+                        font-weight: normal;
+                        font-size: 12px;
+                        color: #555;
+                        -webkit-border-top-right-radius: 4px;                        
+                        -webkit-border-top-left-radius: 4px;
+                        -moz-border-radius-topright: 4px;
+                        -moz-border-radius-topleft: 4px;
+                }
+                        #querylist ul.debug-menu-links li.current a {
+                                background: #fff;
+                                color: #555 !important;
+                        }
+        
+        #querylist h2 {
+                float: left;
+                min-width: 150px;
+                border: 1px solid #eee;
+                padding: 5px 10px 15px;
+                clear: none; important;
+                text-align: center;
+                font-family: georgia, times, serif;
+                font-size: 28px;
+                margin: 15px 10px 15px 0 !important;
+        }
+                #querylist h2 span {
+                        font-size: 12px;
+                        color: #888;
+                        text-transform: uppercase;
+                        white-space: nowrap;
+                        display: block;
+                        margin-bottom: 5px;
+                }
+
+        #object-cache-stats h2 {
+                border: none;
+                float: none;
+                text-align: left;
+                font-size: 22px;
+                margin-bottom: 0;
+        }
+
+        #object-cache-stats ul.debug-menu-links {
+                padding: 0;
+                margin: 0;
+                background: none;
+        }
+                #object-cache-stats ul.debug-menu-links li {
+                        float: left;
+                        margin-bottom: 10px !important;
+                        background: none !important;
+                        border: 1px solid #eee !important;
+                        color: #555 !important;
+                }
+                        #object-cache-stats ul.debug-menu-links li.current a {
+                                background: #ccc !important;
+                                color: #fff !important;
+                                -webkit-border-top-right-radius: 0;                        
+                                -webkit-border-top-left-radius: 0;
+                                -moz-border-radius-topright: 0;
+                                -moz-border-radius-topleft: 0;
+                        }
+                        
+                        #object-cache-stats ul.debug-menu-links li a {
+                                background: none;
+                                color: #555 !important;
+                                overflow: hidden;
+                        }
+        
+        #querylist h3 {
+                margin-bottom: 15px;
+        }
+
+        #querylist ol#wpd-queries {
+                padding: 0 !important;
+                margin: 0 !important;
+                list-style: none;
+                clear: left;
+        }
+                #querylist ol#wpd-queries li {
+                        padding: 10px;
+                        background: #f0f0f0;
+                        margin: 0 0 10px 0;
+                }
+                        #querylist ol#wpd-queries li div.qdebug {
+                                background: #e8e8e8;
+                                margin: 10px -10px -10px -10px;
+                                padding: 5px 150px 5px 5px;
+                                font-size: 11px;
+                                position: relative;
+                                min-height: 20px;
+                        }
+                        
+                        #querylist ol#wpd-queries li div.qdebug span {
+                                position: absolute;
+                                right: 10px;
+                                top: 5px;
+                                white-space: nowrap;
+                        }
+        
+        #querylist a {
+                text-decoration: underline !important;
+                color: blue !important;
+        }
+        #querylist a:hover {
+                text-decoration: none !important;
+        }
+        #querylist .debug-menu-target {
+                display: none;
+        }
+        
+        #querylist ol {
+                font: 12px Monaco, &quot;Courier New&quot;, Courier, Fixed !important;
+                line-height: 180% !important;
+        }
+        
+        #wpadminbar #admin-bar-micro ul li {
+                list-style-type: none;
+                position: relative;
+                margin: 0;
+                padding: 0;
+        }
+        #wpadminbar #admin-bar-micro ul ul, #wpadminbar #admin-bar-micro #awaiting-mod, #wpadminbar .ab-sadmin .count-0 {
+                display: none !important;
+        }
+        #wpadminbar #admin-bar-micro ul li:hover &gt; ul {
+                display: block;
+                position: absolute;
+                top: -1px;
+                left: 100%;
+        }
+        #wpadminbar #admin-bar-micro li a {
+                display: block;
+                text-decoration: none;
+        }
+        #wpadminbar #admin-bar-micro li li a {
+                background: #ddd;
+        }
+        #wpadminbar #admin-bar-micro li li li a {
+                background: #fff;
+        }
+        
+        &lt;?php if ( 'rtl' == $text_direction ) : ?&gt;
+        
+                #querylist {
+                        direction: ltr;
+                }
+                
+                #wpadminbar #admin-bar-micro ul li:hover &gt; ul {
+                        left: auto;
+                        right: 100%;
+                }
+        &lt;?php endif; ?&gt;
+&lt;?php endif; ?&gt;
</ins><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/wp-includes/admin-bar/admin-bar-css.php
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:eol-style
</span><span class="cx">   + native
</span></span></pre></div>
<a id="trunkwpincludesadminbaradminbardebugphp"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/admin-bar/admin-bar-debug.php (0 => 15671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/admin-bar/admin-bar-debug.php                                (rev 0)
+++ trunk/wp-includes/admin-bar/admin-bar-debug.php        2010-09-27 20:26:36 UTC (rev 15671)
</span><span class="lines">@@ -0,0 +1,161 @@
</span><ins>+&lt;?php
+/***
+ * Debug Functions
+ *
+ * When logged in as a super admin, these functions will run to provide
+ * debugging information when specific super admin menu items are selected.
+ *
+ * They are not used when a regular user is logged in.
+ */
+
+function wp_admin_bar_debug_menu() {
+        global $wp_admin_bar, $wpdb;
+
+        if ( !is_super_admin() || !apply_filters('wp_admin_bar_enable_debug_menu', false) )
+                return;
+
+        $queries = $wpdb-&gt;num_queries;
+        $seconds = timer_stop();
+
+        /* Add the main siteadmin menu item */
+        $wp_admin_bar-&gt;add_menu( array( 'id' =&gt; 'queries', 'title' =&gt; &quot;{$queries}q/{$seconds}&quot;, 'href' =&gt; 'javascript:toggle_query_list()', 'meta' =&gt; array( 'class' =&gt; 'ab-sadmin' ) ) );
+}
+add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_debug_menu', 1000 );
+
+function wp_admin_bar_query_debug_list() {
+        global $wpdb, $wp_object_cache;
+
+        if ( !is_super_admin() )
+                return false;
+
+        $debugs = array();
+
+        if ( defined('SAVEQUERIES') &amp;&amp; SAVEQUERIES )
+                $debugs['wpdb'] = array( __('Queries'), 'wp_admin_bar_debug_queries' );
+
+        if ( is_object($wp_object_cache) &amp;&amp; method_exists($wp_object_cache, 'stats') )
+                $debugs['object-cache'] = array( __('Object Cache'), 'wp_admin_bar_debug_object_cache' );
+
+        $debugs = apply_filters( 'wp_admin_bar_debugs_list', $debugs );
+
+        if ( empty($debugs) )
+                return;
+
+?&gt;
+        &lt;script type=&quot;text/javascript&quot;&gt;
+        /* &lt;![CDATA[ */
+        var clickDebugLink = function( targetsGroupId, obj) {
+                var sectionDivs = document.getElementById( targetsGroupId ).childNodes;
+                for ( var i = 0; i &lt; sectionDivs.length; i++ ) {
+                        if ( 1 != sectionDivs[i].nodeType ) {
+                                continue;
+                        }
+                        sectionDivs[i].style.display = 'none';
+                }
+                document.getElementById( obj.href.substr( obj.href.indexOf( '#' ) + 1 ) ).style.display = 'block';
+
+                for ( var i = 0; i &lt; obj.parentNode.parentNode.childNodes.length; i++ ) {
+                        if ( 1 != obj.parentNode.parentNode.childNodes[i].nodeType ) {
+                                continue;
+                        }
+                        obj.parentNode.parentNode.childNodes[i].removeAttribute( 'class' );
+                }
+                obj.parentNode.setAttribute( 'class', 'current' );
+                return false;
+        };
+        /* ]]&gt; */
+        &lt;/script&gt;
+        &lt;div align='left' id='querylist'&gt;
+
+        &lt;h1&gt;Debugging blog #&lt;?php echo $GLOBALS['blog_id']; ?&gt; on &lt;?php echo php_uname( 'n' ); ?&gt;&lt;/h1&gt;
+        &lt;div id=&quot;debug-status&quot;&gt;
+                &lt;p class=&quot;left&quot;&gt;&lt;/p&gt;
+                &lt;p class=&quot;right&quot;&gt;PHP Version: &lt;?php echo phpversion(); ?&gt;&lt;/p&gt;
+        &lt;/div&gt;
+        &lt;ul class=&quot;debug-menu-links&quot;&gt;
+
+&lt;?php        $current = ' class=&quot;current&quot;'; foreach ( $debugs as $debug =&gt; $debug_output ) : ?&gt;
+
+                &lt;li&lt;?php echo $current; ?&gt;&gt;&lt;a id=&quot;debug-menu-link-&lt;?php echo $debug; ?&gt;&quot; href=&quot;#debug-menu-target-&lt;?php echo $debug; ?&gt;&quot; onclick=&quot;try { return clickDebugLink( 'debug-menu-targets', this ); } catch (e) { return true; }&quot;&gt;&lt;?php echo $debug_output[0] ?&gt;&lt;/a&gt;&lt;/li&gt;
+
+&lt;?php        $current = ''; endforeach; ?&gt;
+
+        &lt;/ul&gt;
+
+        &lt;div id=&quot;debug-menu-targets&quot;&gt;
+
+&lt;?php        $current = ' style=&quot;display: block&quot;'; foreach ( $debugs as $debug =&gt; $debug_output ) : ?&gt;
+
+        &lt;div id=&quot;debug-menu-target-&lt;?php echo $debug; ?&gt;&quot; class=&quot;debug-menu-target&quot;&lt;?php echo $current; ?&gt;&gt;
+                &lt;?php echo str_replace( '&amp;nbsp;', '', call_user_func( $debug_output[1] ) ); ?&gt;
+        &lt;/div&gt;
+
+&lt;?php        $current = ''; endforeach; ?&gt;
+
+        &lt;/div&gt;
+
+&lt;?php        do_action( 'wp_admin_bar_debug' ); ?&gt;
+
+        &lt;/div&gt;
+
+&lt;?php
+}
+add_action( 'wp_after_admin_bar_render', 'wp_admin_bar_query_debug_list' );
+
+function wp_admin_bar_debug_queries() {
+        global $wpdb;
+
+        $queries = array();
+        $out = '';
+        $total_time = 0;
+
+        if ( !empty($wpdb-&gt;queries) ) {
+                $show_many = isset($_GET['debug_queries']);
+
+                if ( $wpdb-&gt;num_queries &gt; 500 &amp;&amp; !$show_many )
+                        $out .= &quot;&lt;p&gt;There are too many queries to show easily! &lt;a href='&quot; . add_query_arg( 'debug_queries', 'true' ) . &quot;'&gt;Show them anyway&lt;/a&gt;.&lt;/p&gt;&quot;;
+
+                $out .= '&lt;ol id=&quot;wpd-queries&quot;&gt;';
+                $first_query = 0;
+                $counter = 0;
+
+                foreach ( $wpdb-&gt;queries as $q ) {
+                        list($query, $elapsed, $debug) = $q;
+
+                        $total_time += $elapsed;
+
+                        if ( !$show_many &amp;&amp; ++$counter &gt; 500 )
+                                continue;
+
+                        $query = nl2br(esc_html($query));
+
+                        // $dbhname, $host, $port, $name, $tcp, $elapsed
+                        $out .= &quot;&lt;li&gt;$query&lt;br/&gt;&lt;div class='qdebug'&gt;$debug &lt;span&gt;#{$counter} (&quot; . number_format(sprintf('%0.1f', $elapsed * 1000), 1, '.', ',') . &quot;ms)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;\n&quot;;
+                }
+                $out .= '&lt;/ol&gt;';
+        } else {
+                $out .= &quot;&lt;p&gt;&lt;strong&gt;There are no queries on this page, you won the prize!!! :)&lt;/strong&gt;&lt;/p&gt;&quot;;
+        }
+
+        $query_count = '&lt;h2&gt;&lt;span&gt;Total Queries:&lt;/span&gt;' . number_format( $wpdb-&gt;num_queries ) . &quot;&lt;/h2&gt;\n&quot;;
+        $query_time = '&lt;h2&gt;&lt;span&gt;Total query time:&lt;/span&gt;' . number_format(sprintf('%0.1f', $total_time * 1000), 1) . &quot;ms&lt;/h2&gt;\n&quot;;
+        $memory_usage = '&lt;h2&gt;&lt;span&gt;Peak Memory Used:&lt;/span&gt;' . number_format( memory_get_peak_usage( ) ) . &quot; bytes&lt;/h2&gt;\n&quot;;
+
+        $out = $query_count . $query_time . $memory_usage . $out;
+
+        return $out;
+}
+
+function wp_admin_bar_debug_object_cache() {
+        global $wp_object_cache;
+        ob_start();
+        echo &quot;&lt;div id='object-cache-stats'&gt;&quot;;
+                $wp_object_cache-&gt;stats();
+        echo &quot;&lt;/div&gt;&quot;;
+        $out = ob_get_contents();
+        ob_end_clean();
+
+        return $out;
+}
+
+?&gt;
</ins><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/wp-includes/admin-bar/admin-bar-debug.php
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:eol-style
</span><span class="cx">   + native
</span></span></pre></div>
<a id="trunkwpincludesadminbaradminbarsuperadminphp"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/admin-bar/admin-bar-superadmin.php (0 => 15671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/admin-bar/admin-bar-superadmin.php                                (rev 0)
+++ trunk/wp-includes/admin-bar/admin-bar-superadmin.php        2010-09-27 20:26:36 UTC (rev 15671)
</span><span class="lines">@@ -0,0 +1,156 @@
</span><ins>+&lt;?php
+/**
+ * Use the $wp_admin_bar global to add a menu for site admins and administrator controls.
+ */
+function wp_admin_bar_superadmin_menus() {
+        global $wp_admin_bar, $wpdb;
+
+        if ( !is_object( $wp_admin_bar ) || !is_super_admin() )
+                return false;
+
+        /* Add the &quot;Super Admin&quot; settings sub menu */
+        if ( is_multisite() )
+                wp_admin_bar_superadmin_settings_menu();
+}
+add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_superadmin_menus', 1000 );
+
+/**
+ *
+ * Use the $wp_admin_bar global to add the super admin menu, providing admin options only visible to super admins.
+ */
+function wp_admin_bar_superadmin_settings_menu() {
+        global $wp_admin_bar, $current_blog, $current_user;
+
+        if ( !is_object( $wp_admin_bar ) || !is_super_admin() )
+                return false;
+
+        /* Add the main superadmin menu item */
+        $wp_admin_bar-&gt;add_menu( array( 'id' =&gt; 'superadmin', 'title' =&gt; '&amp;mu;', 'href' =&gt; '', 'meta' =&gt; array( 'class' =&gt; 'ab-sadmin' ) ) );
+
+        wp_admin_bar_build_snackmenu();
+
+        /* Get the settings we need for the current blog */
+        $matureaction = $current_blog-&gt;mature ? 'unmatureblog' : 'matureblog';
+        $maturetext = $current_blog-&gt;mature ? esc_attr__('Unmark as mature') : esc_attr__('Mark as mature');
+        $suspendtext = $current_blog-&gt;spam ? esc_attr('Unsuspend blog') : esc_attr('Suspend blog');
+        $suspendaction = $current_blog-&gt;spam ? 'unspamblog' : 'spamblog';
+        $mature_url = admin_url( &quot;ms-edit.php?action=confirm&amp;amp;action2={$matureaction}&amp;amp;id={$current_blog-&gt;blog_id}&amp;amp;msg=&quot; . urlencode( 'Are you sure you want to ' . strtolower( $maturetext ) . &quot; {$current_blog-&gt;domain} as mature?&quot; ) );
+        $suspend_url = admin_url( &quot;ms-edit.php?action=confirm&amp;amp;action2={$suspendaction}&amp;amp;id={$current_blog-&gt;blog_id}&amp;amp;msg=&quot; . urlencode( 'Are you sure you want to ' . strtolower( $suspendtext ) . &quot; {$current_blog-&gt;domain} ?&quot; ) );
+
+        /* Add the submenu items to the Super Admin menu */
+        $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'superadmin', 'title' =&gt; __( 'Blog Dashboard' ), 'href' =&gt; admin_url(), 'position' =&gt; 10 ) );
+        $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'superadmin', 'title' =&gt; __( 'Blog Options' ),  'href' =&gt; admin_url( &quot;ms-sites.php?action=blogs&amp;amp;searchaction=id&amp;amp;s={$current_blog-&gt;blog_id}&quot; ), 'position' =&gt; 30 ) );
+        $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'superadmin', 'title' =&gt; &quot;$maturetext&quot;, 'href' =&gt; $mature_url, 'position' =&gt; 50 ) );
+        $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'superadmin', 'title' =&gt; &quot;$suspendtext&quot;, 'href' =&gt; $suspend_url, 'position' =&gt; 80 ) );
+}
+
+function wp_admin_bar_build_snackmenu() {
+        global $wp_admin_bar, $menu, $submenu, $pagenow;
+
+        if ( !is_object( $wp_admin_bar ) || !is_super_admin() )
+                return false;
+
+        // Hide moderation count, filter removed at the bottom of this function
+        add_filter( 'wp_count_comments', 'wp_admin_bar_removemodcount' );
+
+        require_once( ABSPATH . 'wp-admin/includes/admin.php' );
+
+        // menu.php assumes it is in the global scope and relies on the $wp_taxonomies global array
+        $wp_taxonomies = array();
+        require_once( ABSPATH . 'wp-admin/menu.php' );
+
+        /* Add the snack menu submenu to the superadmin menu */
+        $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'superadmin', 'title' =&gt; 'Snack Menu', 'href' =&gt; '/wp-admin/' ) );
+
+        /* Loop through the submenus and add them */
+        foreach ( (array) $menu as $key =&gt; $item ) {
+                $admin_is_parent = false;
+                $submenu_as_parent = false;
+
+                if ( $submenu_as_parent &amp;&amp; !empty($submenu[$item[2]]) ) {
+                        $submenu[$item[2]] = array_values($submenu[$item[2]]);  // Re-index.
+                        $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
+                        $menu_file = $submenu[$item[2]][0][2];
+        
+                        if ( false !== $pos = strpos($menu_file, '?') )
+                                $menu_file = substr($menu_file, 0, $pos);
+                        if ( ( ('index.php' != $submenu[$item[2]][0][2]) &amp;&amp; file_exists(WP_PLUGIN_DIR . &quot;/$menu_file&quot;) ) || !empty($menu_hook)) {
+                                $admin_is_parent = true;
+                                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'snack-menu', 'title' =&gt; $item[0], 'href' =&gt; admin_url(&quot;admin.php?page={$submenu[$item[2]][0][2]}&quot;) ) );
+                        } else {
+                                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'snack-menu', 'title' =&gt; $item[0], 'href' =&gt; admin_url(&quot;{$submenu[$item[2]][0][2]}&quot;) ) );
+                        }
+                } else if ( current_user_can($item[1]) ) {
+                        $menu_hook = get_plugin_page_hook($item[2], 'admin.php');
+                        $menu_file = $item[2];
+
+                        if ( false !== $pos = strpos($menu_file, '?') )
+                                $menu_file = substr($menu_file, 0, $pos);
+                        if ( ('index.php' != $item[2]) &amp;&amp; file_exists(WP_PLUGIN_DIR . &quot;/$menu_file&quot;) || !empty($menu_hook) ) {
+                                $admin_is_parent = true;
+                                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'snack-menu', 'title' =&gt; $item[0], 'href' =&gt; admin_url(&quot;admin.php?page={$item[2]}&quot;) ) );
+                        } else {
+                                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'snack-menu', 'title' =&gt; $item[0], 'href' =&gt; admin_url(&quot;{$item[2]}&quot;) ) );
+                        }
+                }
+
+                if ( !empty($submenu[$item[2]]) ) {
+                        $first = true;
+                        $unique_submenu = array();
+                        
+                        foreach ( $submenu[$item[2]] as $sub_key =&gt; $sub_item ) {
+                                if ( !current_user_can($sub_item[1]) || in_array( $sub_item[0], $unique_submenu ) )
+                                        continue;
+                        
+                                $unique_submenu[] = $sub_item[0];
+                                
+                                if ( $first )
+                                        $first = false;
+                                
+                                $menu_file = $item[2];
+                                if ( false !== $pos = strpos($menu_file, '?') )
+                                        $menu_file = substr($menu_file, 0, $pos);
+                                
+                                $menu_hook = get_plugin_page_hook($sub_item[2], $item[2]);
+                                $sub_file = $sub_item[2];
+                                if ( false !== $pos = strpos($sub_file, '?') )
+                                        $sub_file = substr($sub_file, 0, $pos);
+                                
+                                if ( ( ('index.php' != $sub_item[2]) &amp;&amp; file_exists(WP_PLUGIN_DIR . &quot;/$sub_file&quot;) ) || ! empty($menu_hook) ) {
+                                        // If admin.php is the current page or if the parent exists as a file in the plugins or admin dir
+                                
+                                        $parent_exists = (!$admin_is_parent &amp;&amp; file_exists(WP_PLUGIN_DIR . &quot;/$menu_file&quot;) &amp;&amp; !is_dir(WP_PLUGIN_DIR . &quot;/{$item[2]}&quot;) ) || file_exists($menu_file);
+                                        if ( $parent_exists )
+                                                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; sanitize_title( $item[0] ), 'title' =&gt; $sub_item[0], 'href' =&gt; admin_url(&quot;{$item[2]}?page={$sub_item[2]}&quot;) ) );
+                                        elseif ( 'admin.php' == $pagenow || !$parent_exists )
+                                                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; sanitize_title( $item[0] ), 'title' =&gt; $sub_item[0], 'href' =&gt; admin_url(&quot;admin.php?page={$sub_item[2]}&quot;) ) );
+                                        else
+                                                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; sanitize_title( $item[0] ), 'title' =&gt; $sub_item[0], 'href' =&gt; admin_url(&quot;{$item[2]}?page={$sub_item[2]}&quot;) ) );
+                                } else {
+                                        $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; sanitize_title( $item[0] ), 'title' =&gt; $sub_item[0], 'href' =&gt; admin_url(&quot;{$sub_item[2]}&quot;) ) );
+                                }
+                        }
+                }
+        }
+
+        remove_filter( 'wp_count_comments', 'wp_admin_bar_removemodcount' );
+}
+
+// Short circuits wp_count_comments() for the front end
+function wp_admin_bar_removemodcount( $stats ) {
+        if ( is_admin() )
+                return $stats;
+
+        $stats = array(
+                'moderated'      =&gt; 0,
+                'approved'       =&gt; 0,
+                'spam'           =&gt; 0,
+                'trash'          =&gt; 0,
+                'post-trashed'   =&gt; 0,
+                'total_comments' =&gt; 0,
+        );
+
+        return (object) $stats;
+}
+
+?&gt;
</ins><span class="cx">Property changes on: trunk/wp-includes/admin-bar/admin-bar-superadmin.php
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:eol-style
</span><span class="cx">   + native
</span></span></pre></div>
<a id="trunkwpincludesadminbarphp"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/admin-bar.php (0 => 15671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/admin-bar.php                                (rev 0)
+++ trunk/wp-includes/admin-bar.php        2010-09-27 20:26:36 UTC (rev 15671)
</span><span class="lines">@@ -0,0 +1,346 @@
</span><ins>+&lt;?php
+/**
+ * Admin Bar
+ *
+ * This code handles the building and rendering of the press bar.
+ */

+/**
+ * Instantiate the admin bar class and set it up as a global for access elsewhere.
+ */
+function wp_admin_bar_init() {
+        global $current_user, $pagenow, $wp_admin_bar;
+
+        /* Set the protocol constant used throughout this code */
+        if ( !defined( 'PROTO' ) )
+                if ( is_ssl() ) define( 'PROTO', 'https://' ); else define( 'PROTO', 'http://' );
+
+        /* Don't load the admin bar if the user is not logged in, or we are using press this */
+        if ( !is_user_logged_in() || 'press-this.php' ==  $pagenow )
+                return false;
+
+        /* Set up the settings we need to render menu items */
+        if ( !is_object( $current_user ) )
+                $current_user = wp_get_current_user();
+
+        /* Enqueue the JS files for the admin bar. */
+        if ( is_user_logged_in() )
+                wp_enqueue_script( 'jquery', false, false, false, true );
+        
+        /* Load the admin bar class code ready for instantiation */
+        require( ABSPATH . WPINC . '/admin-bar/admin-bar-class.php' );
+
+        /* Only load super admin menu code if the logged in user is a super admin */
+        if ( is_super_admin() ) {
+                require( ABSPATH . WPINC . '/admin-bar/admin-bar-debug.php' );
+                require( ABSPATH . WPINC . '/admin-bar/admin-bar-superadmin.php' );
+        }
+
+        /* Initialize the admin bar */
+        $wp_admin_bar = new wp_admin_bar();
+}
+add_action( 'init', 'wp_admin_bar_init' );
+
+/**
+ * Render the admin bar to the page based on the $wp_admin_bar-&gt;menu member var.
+ * This is called very late on the footer actions so that it will render after anything else being
+ * added to the footer.
+ *
+ * It includes the action &quot;wp_before_admin_bar_render&quot; which should be used to hook in and
+ * add new menus to the admin bar. That way you can be sure that you are adding at most optimal point,
+ * right before the admin bar is rendered. This also gives you access to the $post global, among others.
+ */
+function wp_admin_bar_render() {
+        global $wp_admin_bar;
+
+        if ( !is_object( $wp_admin_bar ) )
+                return false;
+                
+        $wp_admin_bar-&gt;load_user_locale_translations();
+
+        do_action( 'wp_before_admin_bar_render' );
+
+        $wp_admin_bar-&gt;render();
+
+        do_action( 'wp_after_admin_bar_render' );
+        
+        $wp_admin_bar-&gt;unload_user_locale_translations();
+}
+add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
+add_action( 'admin_footer', 'wp_admin_bar_render', 1000 );
+
+/**
+ * Show the logged in user's gravatar as a separator.
+ */
+function wp_admin_bar_me_separator() {
+        global $wp_admin_bar, $current_user;
+
+        if ( !is_object( $wp_admin_bar ) )
+                return false;
+
+        $wp_admin_bar-&gt;add_menu( array( 'id' =&gt; 'me', 'title' =&gt; get_avatar( $current_user-&gt;ID, 16 ), 'href' =&gt; $wp_admin_bar-&gt;user-&gt;account_domain . 'wp-admin/profile.php' ) );
+}
+add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_me_separator', 10 );
+
+/**
+ * Use the $wp_admin_bar global to add the &quot;My Account&quot; menu and all submenus.
+ */
+function wp_admin_bar_my_account_menu() {
+        global $wp_admin_bar, $current_user;
+
+        if ( !is_object( $wp_admin_bar ) )
+                return false;
+
+        /* Add the 'My Account' menu */
+        $wp_admin_bar-&gt;add_menu( array( 'id' =&gt; 'my-account', 'title' =&gt; __( 'My Account' ), 'href' =&gt; admin_url('profile.php') ) );
+
+        /* Add the &quot;My Account&quot; sub menus */
+        $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'my-account', 'title' =&gt; __( 'Edit My Profile' ), 'href' =&gt; admin_url('profile.php') ) );
+        $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'my-account', 'title' =&gt; __( 'Global Dashboard' ), 'href' =&gt; admin_url() ) );
+        $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'my-account', 'title' =&gt; __( 'Log Out' ), 'href' =&gt; wp_logout_url() ) );
+}
+add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_my_account_menu', 20 );
+
+/**
+ * Use the $wp_admin_bar global to add the &quot;My Blogs/[Blog Name]&quot; menu and all submenus.
+ */
+function wp_admin_bar_my_blogs_menu() {
+        global $wpdb, $wp_admin_bar;
+
+        if ( !is_object( $wp_admin_bar ) )
+                return false;
+
+        /* Remove the global dashboard */
+        if ( is_multisite() ) {
+                foreach ( (array) $wp_admin_bar-&gt;user-&gt;blogs as $key =&gt; $blog ) {
+                        if ( get_dashboard_blog() == $blog-&gt;domain )
+                                unset( $wp_admin_bar-&gt;user-&gt;blogs[$key] );
+                }
+        }
+
+        /* Add the 'My Dashboards' menu if the user has more than one blog. */
+        if ( count( $wp_admin_bar-&gt;user-&gt;blogs ) &gt; 1 ) {
+                $wp_admin_bar-&gt;add_menu( array( 'id' =&gt; 'my-blogs', 'title' =&gt; __( 'My Blogs' ), 'href' =&gt; $wp_admin_bar-&gt;user-&gt;account_domain ) );
+
+                $default = includes_url('images/wpmini-blue.png');
+
+                $counter = 2;
+                foreach ( (array) $wp_admin_bar-&gt;user-&gt;blogs as $blog ) {
+                        $blogdomain = preg_replace( '!^https?://!', '', $blog-&gt;siteurl );
+                        // @todo Replace with some favicon lookup.
+                        //$blavatar = '&lt;img src=&quot;' . esc_url( blavatar_url( blavatar_domain( $blog-&gt;siteurl ), 'img', 16, $default ) ) . '&quot; alt=&quot;Blavatar&quot; width=&quot;16&quot; height=&quot;16&quot; /&gt;';
+                        $blavatar = '&lt;img src=&quot;' . esc_url($default) . '&quot; alt=&quot;Blavatar&quot; width=&quot;16&quot; height=&quot;16&quot; /&gt;';;
+
+                        $marker = '';
+                        if ( strlen($blog-&gt;blogname) &gt; 35 )
+                                $marker = '...';
+
+                        if ( empty( $blog-&gt;blogname ) )
+                                $blogname = $blog-&gt;domain;
+                        else
+                                $blogname = substr( $blog-&gt;blogname, 0, 35 ) . $marker;
+
+                        if ( !isset( $blog-&gt;visible ) || $blog-&gt;visible === true ) {
+                                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'my-blogs', 'id' =&gt; 'blog-' . $blog-&gt;userblog_id, 'title' =&gt; $blavatar . $blogname, 'href' =&gt; constant( 'PROTO' ) . $blogdomain . '/wp-admin/' ) );
+                                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'blog-' . $blog-&gt;userblog_id, 'id' =&gt; 'blog-' . $blog-&gt;userblog_id . '-d', 'title' =&gt; __( 'Dashboard' ), 'href' =&gt; constant( 'PROTO' ) . $blogdomain . '/wp-admin/' ) );
+                                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'blog-' . $blog-&gt;userblog_id, 'id' =&gt; 'blog-' . $blog-&gt;userblog_id . '-n', 'title' =&gt; __( 'New Post' ), 'href' =&gt; constant( 'PROTO' ) . $blogdomain . '/wp-admin/post-new.php' ) );
+                                // @todo, stats plugins should add this:
+                                //$wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'blog-' . $blog-&gt;userblog_id, 'id' =&gt; 'blog-' . $blog-&gt;userblog_id . '-s', 'title' =&gt; __( 'Blog Stats' ), 'href' =&gt; constant( 'PROTO' ) . $blogdomain . '/wp-admin/index.php?page=stats' ) );
+                                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'blog-' . $blog-&gt;userblog_id, 'id' =&gt; 'blog-' . $blog-&gt;userblog_id . '-c', 'title' =&gt; __( 'Manage Comments' ), 'href' =&gt; constant( 'PROTO' ) . $blogdomain . '/wp-admin/edit-comments.php' ) );
+                                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'blog-' . $blog-&gt;userblog_id, 'id' =&gt; 'blog-' . $blog-&gt;userblog_id . '-v', 'title' =&gt; __( 'Read Blog' ), 'href' =&gt; constant( 'PROTO' ) . $blogdomain ) );
+                        }
+                        $counter++;
+                }
+
+                /* Add the &quot;Manage Blogs&quot; menu item */
+                // @todo, use dashboard blog.
+                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'my-blogs', 'id' =&gt; 'manage-blogs', 'title' =&gt; __( 'Manage Blogs' ), admin_url('my-sites.php') ) );
+
+        /* Add the 'My Dashboard' menu if the user only has one blog. */
+        } else {
+                $wp_admin_bar-&gt;add_menu( array( 'id' =&gt; 'my-blogs', 'title' =&gt; __( 'My Blog' ), 'href' =&gt; $wp_admin_bar-&gt;user-&gt;account_domain ) );
+
+                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'my-blogs', 'id' =&gt; 'blog-1-d', 'title' =&gt; __( 'Dashboard' ), 'href' =&gt; admin_url() ) );
+                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'my-blogs', 'id' =&gt; 'blog-1-n', 'title' =&gt; __( 'New Post' ), 'href' =&gt; admin_url('post-new.php') ) );
+                // @todo Stats plugins should add this.
+                //$wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'my-blogs', 'id' =&gt; 'blog-1-s', 'title' =&gt; __( 'Blog Stats' ), 'href' =&gt; admin_ur;('index.php?page=stats') ) );
+                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'my-blogs', 'id' =&gt; 'blog-1-c', 'title' =&gt; __( 'Manage Comments' ), 'href' =&gt; admin_url('edit-comments.php') ) );
+                $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'my-blogs', 'id' =&gt; 'blog-1-v', 'title' =&gt; __( 'Read Blog' ), 'href' =&gt; home_url() ) );
+        }
+}
+add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_my_blogs_menu', 30 );
+
+/**
+ * Show the blavatar of the current blog as a separator.
+ */
+function wp_admin_bar_blog_separator() {
+        global $wp_admin_bar, $current_user, $current_blog;
+
+        if ( !is_object( $wp_admin_bar ) )
+                return false;
+
+        $default = includes_url('images/wpmini-blue.png');
+
+        $wp_admin_bar-&gt;add_menu( array( 'id' =&gt; 'blog', 'title' =&gt; '&lt;img class=&quot;avatar&quot; src=&quot;' . $default . '&quot; alt=&quot;' . __( 'Current blog avatar' ) . '&quot; width=&quot;16&quot; height=&quot;16&quot; /&gt;', 'href' =&gt; home_url() ) );
+}
+add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_blog_separator', 40 );
+
+/**
+ * Use the $wp_admin_bar global to add a menu for blog info, accessable to all users.
+ */
+function wp_admin_bar_bloginfo_menu() {
+        global $wp_admin_bar;
+
+        if ( !is_object( $wp_admin_bar ) )
+                return false;
+
+        /* Add the Blog Info menu */
+        $wp_admin_bar-&gt;add_menu( array( 'id' =&gt; 'bloginfo', 'title' =&gt; __( 'Blog Info' ), 'href' =&gt; '' ) );
+
+        $wp_admin_bar-&gt;add_menu( array( 'parent' =&gt; 'bloginfo', 'title' =&gt; __( 'Get Shortlink' ), 'href' =&gt; '', 'meta' =&gt; array( 'onclick' =&gt; 'javascript:function wpcomshort() { var url=document.location;var links=document.getElementsByTagName(&amp;#39;link&amp;#39;);var found=0;for(var i = 0, l; l = links[i]; i++){if(l.getAttribute(&amp;#39;rel&amp;#39;)==&amp;#39;shortlink&amp;#39;) {found=l.getAttribute(&amp;#39;href&amp;#39;);break;}}if (!found) {for (var i = 0; l = document.links[i]; i++) {if (l.getAttribute(&amp;#39;rel&amp;#39;) == &amp;#39;shortlink&amp;#39;) {found = l.getAttribute(&amp;#39;href&amp;#39;);break;}}}if (found) {prompt(&amp;#39;URL:&amp;#39;, found);} else {alert(&amp;#39;No shortlink available for this page&amp;#39;); } return false; } wpcomshort();' ) ) );
+}
+add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_bloginfo_menu', 50 );
+
+/**
+ * Use the $wp_admin_bar global to add the &quot;Edit Post&quot; menu when viewing a single post.
+ */
+function wp_admin_bar_edit_menu() {
+        global $post, $wp_admin_bar;
+
+        if ( !is_object( $wp_admin_bar ) )
+                return false;
+
+        if ( !is_single() &amp;&amp; !is_page() )
+                return false;
+
+        if ( !$post_type_object = get_post_type_object( $post-&gt;post_type ) )
+                return false;
+
+        if ( !current_user_can( $post_type_object-&gt;cap-&gt;edit_post, $post-&gt;ID ) )
+                return false;
+
+        $wp_admin_bar-&gt;add_menu( array( 'id' =&gt; 'edit', 'title' =&gt; __( 'Edit' ), 'href' =&gt; get_edit_post_link( $post-&gt;ID ) ) );
+}
+add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_edit_menu', 100 );
+
+/**
+ * Load up the CSS needed to render the admin bar nice and pretty.
+ */
+function wp_admin_bar_css() {
+        global $pagenow, $wp_locale;
+
+        if ( !is_user_logged_in() )
+                return false;
+
+        if ( 'press-this.php' == $pagenow )
+                return;
+
+        $nobump = false;
+
+        /* Wish we could use wp_enqueue_style() here, but it will not let us pass GET params to the stylesheet correctly. */
+        ?&gt;
+        &lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php echo includes_url('admin-bar/admin-bar-css.php') . '?t=' . get_current_theme() . '&amp;amp;a=' . is_admin() . '&amp;amp;p=' . is_ssl() . '&amp;amp;sa=' . is_super_admin() . '&amp;amp;td=' . $wp_locale-&gt;text_direction . '&amp;amp;inc=' . includes_url() . '&amp;amp;nobump=' . $nobump; ?&gt;&quot; type=&quot;text/css&quot; /&gt;
+        &lt;!--[if IE 6]&gt;&lt;style type=&quot;text/css&quot;&gt;#wpadminbar, #wpadminbar .menupop a span, #wpadminbar .menupop ul li a:hover, #wpadminbar .myaccount a, .quicklinks a:hover,#wpadminbar .menupop:hover { background-image: none !important; } #wpadminbar .myaccount a { margin-left:0 !important; padding-left:12px !important;}&lt;/style&gt;&lt;![endif]--&gt;
+        &lt;style type=&quot;text/css&quot; media=&quot;print&quot;&gt;#wpadminbar { display:none; }&lt;/style&gt;&lt;?php
+}
+add_action( 'wp_head', 'wp_admin_bar_css' );
+add_action( 'admin_head', 'wp_admin_bar_css' );
+
+/**
+ * Load up the JS needed to allow the admin bar to function correctly.
+ */
+function wp_admin_bar_js() {
+        global $wp_admin_bar;
+
+        if ( !is_object( $wp_admin_bar ) )
+                return false;
+
+        ?&gt;
+        &lt;script type=&quot;text/javascript&quot;&gt;
+/*        &lt;![CDATA[ */
+                function pressthis(step) {if (step == 1) {if(navigator.userAgent.indexOf('Safari') &gt;= 0) {Q=getSelection();}else {if(window.getSelection)Q=window.getSelection().toString();else if(document.selection)Q=document.selection.createRange().text;else Q=document.getSelection().toString();}} else {location.href='&lt;?php echo $wp_admin_bar-&gt;user-&gt;account_domain; ?&gt;wp-admin/post-new.php?text='+encodeURIComponent(Q.toString())+'&amp;amp;popupurl='+encodeURIComponent(location.href)+'&amp;amp;popuptitle='+encodeURIComponent(document.title);}}
+                function toggle_query_list() { var querylist = document.getElementById( 'querylist' );if( querylist.style.display == 'block' ) {querylist.style.display='none';} else {querylist.style.display='block';}}
+
+                jQuery( function() {
+                        (function(jq){jq.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=jq.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))&lt;cfg.sensitivity){jq(ob).unbind(&quot;mousemove&quot;,track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type==&quot;mouseover&quot;?e.fromElement:e.toElement)||e.relatedTarget;while(p&amp;&amp;p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type==&quot;mouseover&quot;){pX=ev.pageX;pY=ev.pageY;jq(ob).bind(&quot;mousemove&quot;,track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{jq(ob).unbind(&quot;mousemove&quot;,track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);
+                        (function(jq){jq.fn.superfish=function(op){var sf=jq.fn.superfish,c=sf.c,jqarrow=jq([''].join('')),over=function(){var jqjq=jq(this),menu=getMenu(jqjq);clearTimeout(menu.sfTimer);jqjq.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var jqjq=jq(this),menu=getMenu(jqjq),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=(jq.inArray(jqjq[0],o.jqpath)&gt;-1);jqjq.hideSuperfishUl();if(o.jqpath.length&amp;&amp;jqjq.parents(['li.',o.hoverClass].join('')).length&lt;1){over.call(o.jqpath);}},o.delay);},getMenu=function(jqmenu){var menu=jqmenu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function(jqa){jqa.addClass(c.anchorClass).append(jqarrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=jq.extend({},sf.defaults,op);o.jqpath=jq('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){jq(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass);});sf.o[s]=sf.op=o;jq('li:has(ul)',this)[(jq.fn.hoverIntent&amp;&amp;!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow(jq('&gt;a:first-child',this));}).not('.'+c.bcClass).hideSuperfishUl();var jqa=jq('a',this);jqa.each(function(i){var jqli=jqa.eq(i).parents('li');jqa.eq(i).focus(function(){over.call(jqli);}).blur(function(){out.call(jqli);});});o.onInit.call(this);}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&amp;&amp;!(jq.browser.msie&amp;&amp;jq.browser.version&lt;7))menuClasses.push(c.shadowClass);jq(this).addClass(menuClasses.join(' '));});};var sf=jq.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if(jq.browser.msie&amp;&amp;jq.browser.version&gt;6&amp;&amp;o.dropShadows&amp;&amp;o.animation.opacity!=undefined) this.toggleClass(sf.c.shadowClass+'-off');};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:600,animation:{opacity:'show'},speed:100,autoArrows:false,dropShadows:false,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};jq.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.jqpath:'';o.retainPath=false;var jqul=jq(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('&gt;ul').hide().css('visibility','hidden');o.onHide.call(jqul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',jqul=this.addClass(o.hoverClass).find('&gt;ul:hidden').css('visibility','visible');sf.IE7fix.call(jqul);o.onBeforeShow.call(jqul);jqul.animate(o.animation,o.speed,function(){sf.IE7fix.call(jqul);o.onShow.call(jqul);});return this;}});})(jQuery);
+
+                        &lt;?php if ( is_single() ) : ?&gt;
+                        if ( jQuery(this).width() &lt; 1100 ) jQuery(&quot;#adminbarsearch&quot;).hide();
+                        &lt;?php endif; ?&gt;
+                                
+                        jQuery( '#wpadminbar li.ab-my-account, #wpadminbar li.ab-bloginfo' ).mouseover( function() {
+                                if ( jQuery(this).hasClass( 'ab-my-account' ) ) jQuery('#wpadminbar li.ab-me &gt; a').addClass('hover');
+                                if ( jQuery(this).hasClass( 'ab-bloginfo' ) ) jQuery('#wpadminbar li.ab-blog &gt; a').addClass('hover');
+                        });
+                        
+                        jQuery( '#wpadminbar li.ab-my-account, #wpadminbar li.ab-bloginfo' ).mouseout( function() {
+                                if ( jQuery(this).hasClass( 'ab-my-account' ) ) jQuery('#wpadminbar li.ab-me &gt; a').removeClass('hover');
+                                if ( jQuery(this).hasClass( 'ab-bloginfo' ) ) jQuery('#wpadminbar li.ab-blog &gt; a').removeClass('hover');
+                        });
+
+                        &lt;?php if ( is_single() ) : ?&gt;
+                        jQuery(window).resize( function() {
+                                if ( jQuery(this).width() &lt; 1100 )
+                                        jQuery(&quot;#adminbarsearch&quot;).hide();
+                                
+                                if ( jQuery(this).width() &gt; 1100 )
+                                        jQuery(&quot;#adminbarsearch&quot;).show();
+                        });
+                        &lt;?php endif; ?&gt;
+                        
+                        jQuery( '#wpadminbar ul ul li a' ).mouseover( function() {
+                                var root = jQuery(this).parents('div.quicklinks ul &gt; li');
+                                var par = jQuery(this).parent();
+                                var children = par.children('ul');
+                                if ( root.hasClass('ab-sadmin') )
+                                        jQuery(children[0]).css('&lt;?php echo( is_rtl() ? 'left'  : 'right' ); ?&gt;',par.parents('ul').width() - 1 +'px' );
+                                else
+                                        jQuery(children[0]).css('&lt;?php echo( is_rtl() ? 'right'  : 'left' ); ?&gt;',par.parents('ul').width() +'px' );
+                                
+                                jQuery(children[0]).css('top', '0' );
+                        });
+                        
+                        &lt;?php if ( is_user_logged_in() ) : // Hash links scroll 32px back so admin bar doesn't cover. ?&gt;
+                                if ( window.location.hash ) window.scrollBy(0,-32);
+                        &lt;?php endif; ?&gt;
+                
+                });
+
+                jQuery( function() { 
+                        jQuery('#wpadminbar').appendTo('body'); 
+                        jQuery(&quot;#wpadminbar ul&quot;).superfish();
+                });
+
+                /*        ]]&gt; */
+        &lt;/script&gt;&lt;?php
+}
+add_action( 'wp_footer', 'wp_admin_bar_js' );
+add_action( 'admin_footer', 'wp_admin_bar_js' );
+
+/**
+ * Return a rendered admin bar via AJAX for use on pages that do not run inside the
+ * WP environment. Used on bbPress forum pages to show the admin bar.
+ */
+function wp_admin_bar_ajax_render() {
+        global $wp_admin_bar;
+
+        wp_admin_bar_js();
+        wp_admin_bar_css();
+        wp_admin_bar_render();
+        die;
+}
+add_action( 'wp_ajax_adminbar_render', 'wp_admin_bar_ajax_render' );
+
+function is_admin_bar() {
+        return ( 0 === strpos($_SERVER['REQUEST_URI'], '/js/admin-bar') );
+}
+
+function wp_admin_bar_lang($locale) {
+        if ( is_admin_bar() )
+                $locale = get_locale();
+        return $locale;
+}
+add_filter('locale', 'wp_admin_bar_lang');
+
+?&gt;
</ins><span class="cx">Property changes on: trunk/wp-includes/admin-bar.php
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:eol-style
</span><span class="cx">   + native
</span></span></pre></div>
<a id="trunkwpincludesimagesadminbarspritertlpng"></a>
<div class="binary"><h4>Added: trunk/wp-includes/images/admin-bar-sprite-rtl.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/wp-includes/images/admin-bar-sprite-rtl.png
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx">   + application/octet-stream
</span><a id="trunkwpincludesimagesadminbarspritepng"></a>
<div class="binary"><h4>Added: trunk/wp-includes/images/admin-bar-sprite.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/wp-includes/images/admin-bar-sprite.png
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx">   + application/octet-stream
</span><a id="trunkwpincludesimageswpminibluepng"></a>
<div class="binary"><h4>Added: trunk/wp-includes/images/wpmini-blue.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/wp-includes/images/wpmini-blue.png
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx">   + application/octet-stream
</span><a id="trunkwpincludesmsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-functions.php (15670 => 15671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-functions.php        2010-09-27 07:29:18 UTC (rev 15670)
+++ trunk/wp-includes/ms-functions.php        2010-09-27 20:26:36 UTC (rev 15671)
</span><span class="lines">@@ -30,46 +30,6 @@
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function get_blogs_of_user( $id, $all = false ) {
-        global $wpdb;
-
-        $cache_suffix = $all ? '_all' : '_short';
-        $return = wp_cache_get( 'blogs_of_user_' . $id . $cache_suffix, 'users' );
-        if ( $return )
-                return apply_filters( 'get_blogs_of_user', $return, $id, $all );
-
-        $user = get_userdata( (int) $id );
-        if ( !$user )
-                return false;
-
-        $blogs = $match = array();
-        $prefix_length = strlen($wpdb-&gt;base_prefix);
-        foreach ( (array) $user as $key =&gt; $value ) {
-                if ( $prefix_length &amp;&amp; substr($key, 0, $prefix_length) != $wpdb-&gt;base_prefix )
-                        continue;
-                if ( substr($key, -12, 12) != 'capabilities' )
-                        continue;
-                if ( preg_match( '/^' . $wpdb-&gt;base_prefix . '((\d+)_)?capabilities$/', $key, $match ) ) {
-                        if ( count( $match ) &gt; 2 )
-                                $blog_id = $match[ 2 ];
-                        else
-                                $blog_id = 1;
-                        $blog = get_blog_details( $blog_id );
-                        if ( $blog &amp;&amp; isset( $blog-&gt;domain ) &amp;&amp; ( $all == true || $all == false &amp;&amp; ( $blog-&gt;archived == 0 &amp;&amp; $blog-&gt;spam == 0 &amp;&amp; $blog-&gt;deleted == 0 ) ) ) {
-                                $blogs[ $blog_id ]-&gt;userblog_id        = $blog_id;
-                                $blogs[ $blog_id ]-&gt;blogname                = $blog-&gt;blogname;
-                                $blogs[ $blog_id ]-&gt;domain                = $blog-&gt;domain;
-                                $blogs[ $blog_id ]-&gt;path                        = $blog-&gt;path;
-                                $blogs[ $blog_id ]-&gt;site_id                = $blog-&gt;site_id;
-                                $blogs[ $blog_id ]-&gt;siteurl                = $blog-&gt;siteurl;
-                        }
-                }
-        }
-
-        wp_cache_add( 'blogs_of_user_' . $id . $cache_suffix, $blogs, 'users', 5 );
-        return apply_filters( 'get_blogs_of_user', $blogs, $id, $all );
-}
-
</del><span class="cx"> function get_active_blog_for_user( $user_id ) { // get an active blog for user - either primary blog or from blogs list
</span><span class="cx">         global $wpdb;
</span><span class="cx">         $blogs = get_blogs_of_user( $user_id );
</span><span class="lines">@@ -366,21 +326,6 @@
</span><span class="cx">         return $url;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function is_blog_user( $blog_id = 0 ) {
-        global $wpdb;

-        $current_user = wp_get_current_user();
-        if ( !$blog_id )
-                $blog_id = $wpdb-&gt;blogid;
-
-        $cap_key = $wpdb-&gt;base_prefix . $blog_id . '_capabilities';
-
-        if ( is_array($current_user-&gt;$cap_key) &amp;&amp; in_array(1, $current_user-&gt;$cap_key) )
-                return true;
-
-        return false;
-}
-
</del><span class="cx"> function is_email_address_unsafe( $user_email ) {
</span><span class="cx">         $banned_names = get_site_option( 'banned_email_domains' );
</span><span class="cx">         if ($banned_names &amp;&amp; !is_array( $banned_names ))
</span></span></pre></div>
<a id="trunkwpincludesuserphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/user.php (15670 => 15671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/user.php        2010-09-27 07:29:18 UTC (rev 15670)
+++ trunk/wp-includes/user.php        2010-09-27 20:26:36 UTC (rev 15671)
</span><span class="lines">@@ -575,6 +575,167 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * Get the blogs a user belong to.
+ *
+ * $since 3.0.0
+ *
+ * @param int $id User Id
+ * @param bool $all Whether to retrieve all blog details or an abbreviated set of details. Default is abbreviated.
+ * @return array A list of the user's blogs.
+ */
+function get_blogs_of_user( $id, $all = false ) {
+        global $wpdb;
+
+        if ( !is_multisite() ) {
+                global $blog_id;
+                $blogs = array();
+                $blogs[ $blog_id ]-&gt;userblog_id = $blog_id;
+                $blogs[ $blog_id ]-&gt;blogname = get_option('blogname');
+                $blogs[ $blog_id ]-&gt;domain = '';
+                $blogs[ $blog_id ]-&gt;path = '';
+                $blogs[ $blog_id ]-&gt;site_id = 1;
+                $blogs[ $blog_id ]-&gt;siteurl = get_option('siteurl');
+                return $blogs;
+        }
+
+        $cache_suffix = $all ? '_all' : '_short';
+        $return = wp_cache_get( 'blogs_of_user_' . $id . $cache_suffix, 'users' );
+        if ( $return )
+                return apply_filters( 'get_blogs_of_user', $return, $id, $all );
+
+        $user = get_userdata( (int) $id );
+        if ( !$user )
+                return false;
+
+        $blogs = $match = array();
+        $prefix_length = strlen($wpdb-&gt;base_prefix);
+        foreach ( (array) $user as $key =&gt; $value ) {
+                if ( $prefix_length &amp;&amp; substr($key, 0, $prefix_length) != $wpdb-&gt;base_prefix )
+                        continue;
+                if ( substr($key, -12, 12) != 'capabilities' )
+                        continue;
+                if ( preg_match( '/^' . $wpdb-&gt;base_prefix . '((\d+)_)?capabilities$/', $key, $match ) ) {
+                        if ( count( $match ) &gt; 2 )
+                                $blog_id = $match[ 2 ];
+                        else
+                                $blog_id = 1;
+                        $blog = get_blog_details( $blog_id );
+                        if ( $blog &amp;&amp; isset( $blog-&gt;domain ) &amp;&amp; ( $all == true || $all == false &amp;&amp; ( $blog-&gt;archived == 0 &amp;&amp; $blog-&gt;spam == 0 &amp;&amp; $blog-&gt;deleted == 0 ) ) ) {
+                                $blogs[ $blog_id ]-&gt;userblog_id        = $blog_id;
+                                $blogs[ $blog_id ]-&gt;blogname                = $blog-&gt;blogname;
+                                $blogs[ $blog_id ]-&gt;domain                = $blog-&gt;domain;
+                                $blogs[ $blog_id ]-&gt;path                        = $blog-&gt;path;
+                                $blogs[ $blog_id ]-&gt;site_id                = $blog-&gt;site_id;
+                                $blogs[ $blog_id ]-&gt;siteurl                = $blog-&gt;siteurl;
+                        }
+                }
+        }
+
+        wp_cache_add( 'blogs_of_user_' . $id . $cache_suffix, $blogs, 'users', 5 );
+        return apply_filters( 'get_blogs_of_user', $blogs, $id, $all );
+}
+
+function get_ordered_blogs_of_user( $user_id, $visibility = true ) {
+        $newblogs      = $ordered = array();
+        $blogs         = get_blogs_of_user( $user_id );
+        $order_meta    = get_user_meta( $user_id, 'blog_order' );
+        $visible_meta  = get_user_meta( $user_id, 'blog_visibility' );
+        
+        $order = $order_meta;
+        if ( !is_array( $order ) )
+                $order = array();
+
+        $visible = $visible_meta;
+        if ( !is_array( $visible ) )
+                $visible = array();
+        
+        // Index the blogs by userblog_id and set the visibility flag
+        // Visibility is on by default, unless a linked site then off
+        foreach ( $blogs AS $blog ) {
+                $blog-&gt;visible = true;
+
+                if ( isset( $visible[$blog-&gt;userblog_id] ) )
+                        $blog-&gt;visible = $visible[$blog-&gt;userblog_id];
+
+                $newblogs[$blog-&gt;userblog_id] = $blog;
+        }
+
+        // Add the blogs to our list by order
+        foreach ( (array)$order AS $id ) {
+                // A previous change was saving the entire blog details into ordered, not just the blog ID - this detects it
+                if ( is_object( $id ) &amp;&amp; isset( $id-&gt;userblog_id ) )
+                        $id = $id-&gt;userblog_id;
+                        
+                if ( is_numeric( $id ) &amp;&amp; isset( $newblogs[intval( $id )] ) ) {
+                        $ordered[$id] = $newblogs[$id];
+                        unset( $newblogs[$id] );
+                }
+        }
+
+        // Add any blog not yet ordered to the end
+        foreach ( $newblogs AS $blog ) {
+                $ordered[$blog-&gt;userblog_id] = $blog;
+        }
+
+        // If we're only interested in visible blogs then remove the rest
+        if ( $visibility ) {
+                foreach ( (array)$ordered AS $pos =&gt; $blog ) {
+                        if ( $blog-&gt;visible == false )
+                                unset( $ordered[$pos] );
+                }
+        }
+
+/*
+        // Set the order and visible options if the user doesn't have any,
+        // but rate limit it so that the global DB doesn't get hammered
+        if ( !is_array( $order_meta ) &amp;&amp; ( 1 == mt_rand( 1, 10 ) ) )
+                update_usermeta( $user_id, 'blog_order', array() );
+
+        if ( !is_array( $visible_meta ) &amp;&amp; ( 1 == mt_rand( 1, 10 ) ) )
+                update_usermeta( $user_id, 'blog_visibility', array() );
+*/
+
+        return apply_filters( 'ordered_blogs', $ordered );
+}
+
+function set_blog_visibility( $blog_id, $visible ) {
+        global $current_user;
+
+        if ( is_blog_user( $blog_id ) ) {
+                $visibility = get_user_meta( $current_user-&gt;ID, 'blog_visibility' );
+                if ( !is_array( $visibility ) )
+                        $visibility = array();
+
+                $visibility[$blog_id] = $visible;
+
+                update_user_meta( $current_user-&gt;ID, 'blog_visibility', $visibility );
+        }
+}
+
+/**
+ * Checks if the current user belong to a given blog.
+ *
+ * @since 3.0.0
+ *
+ * @param int $blog_id Blog ID
+ * @return bool True if the current users belong to $blog_id, false if not.
+ */
+function is_blog_user( $blog_id = 0 ) {
+        global $wpdb;

+        $current_user = wp_get_current_user();
+        if ( !$blog_id )
+                $blog_id = $wpdb-&gt;blogid;
+
+        $cap_key = $wpdb-&gt;base_prefix . $blog_id . '_capabilities';
+
+        if ( is_array($current_user-&gt;$cap_key) &amp;&amp; in_array(1, $current_user-&gt;$cap_key) )
+                return true;
+
+        return false;
+}
+
+/**
</ins><span class="cx">  * Add meta data field to a user.
</span><span class="cx">  *
</span><span class="cx">  * Post meta data is called &quot;Custom Fields&quot; on the Administration Panels.
</span></span></pre></div>
<a id="trunkwpsettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-settings.php (15670 => 15671)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-settings.php        2010-09-27 07:29:18 UTC (rev 15670)
+++ trunk/wp-settings.php        2010-09-27 20:26:36 UTC (rev 15671)
</span><span class="lines">@@ -133,6 +133,7 @@
</span><span class="cx"> require( ABSPATH . WPINC . '/widgets.php' );
</span><span class="cx"> require( ABSPATH . WPINC . '/nav-menu.php' );
</span><span class="cx"> require( ABSPATH . WPINC . '/nav-menu-template.php' );
</span><ins>+require( ABSPATH . WPINC . '/admin-bar.php' );
</ins><span class="cx"> 
</span><span class="cx"> // Load multisite-specific files.
</span><span class="cx"> if ( is_multisite() ) {
</span></span></pre>
</div>
</div>

</body>
</html>