Ticket #18197: 18197.bar.3.diff

File 18197.bar.3.diff, 31.3 KB (added by scribu, 21 months ago)
  • wp-admin/admin-header.php

    diff --git wp-admin/admin-header.php wp-admin/admin-header.php
    index c7500e1..ac6b734 100644
    var userSettings = { 
    6262        thousandsSeparator = '<?php echo addslashes( $wp_locale->number_format['thousands_sep'] ); ?>', 
    6363        decimalPoint = '<?php echo addslashes( $wp_locale->number_format['decimal_point'] ); ?>', 
    6464        isRtl = <?php echo (int) is_rtl(); ?>; 
    65          
     65 
    6666        function wp_set_width_class() { 
    6767                var w = document.body.clientWidth, bc = document.body.className; 
    6868 
    wp_set_width_class(); 
    115115<div id="wpwrap"> 
    116116<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?> 
    117117<div id="wpcontent"> 
    118 <div id="wphead"> 
    119 <?php 
    120  
    121 if ( is_network_admin() ) 
    122         $blog_name = sprintf( __('%s Network Admin'), esc_html($current_site->site_name) ); 
    123 elseif ( is_user_admin() ) 
    124         $blog_name = sprintf( __('%s Global Dashboard'), esc_html($current_site->site_name) ); 
    125 else 
    126         $blog_name = get_bloginfo('name', 'display'); 
    127 if ( '' == $blog_name ) { 
    128         $blog_name = __( 'Visit Site' ); 
    129 } else { 
    130         $blog_name_excerpt = wp_html_excerpt($blog_name, 40); 
    131         if ( $blog_name != $blog_name_excerpt ) 
    132                 $blog_name_excerpt = trim($blog_name_excerpt) . '&hellip;'; 
    133         $blog_name = $blog_name_excerpt; 
    134         unset($blog_name_excerpt); 
    135 } 
    136 $title_class = ''; 
    137 if ( function_exists('mb_strlen') ) { 
    138         if ( mb_strlen($blog_name, 'UTF-8') > 30 ) 
    139                 $title_class = 'class="long-title"'; 
    140 } else { 
    141         if ( strlen($blog_name) > 30 ) 
    142                 $title_class = 'class="long-title"'; 
    143 } 
    144 ?> 
    145  
    146 <img id="header-logo" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" alt="" width="16" height="16" /> 
    147 <h1 id="site-heading" <?php echo $title_class ?>> 
    148         <a href="<?php echo trailingslashit( get_bloginfo( 'url' ) ); ?>" title="<?php esc_attr_e('Visit Site') ?>"> 
    149                 <span id="site-title"><?php echo $blog_name ?></span> 
    150         </a> 
    151 </h1> 
    152118 
    153119<?php 
    154  
    155120do_action('in_admin_header'); 
    156  
    157 $links = array(); 
    158  
    159 // Generate user profile and info links. 
    160 $links[5] = sprintf( __('Howdy, %1$s'), $user_identity ); 
    161  
    162 $links[8] = '<a href="profile.php" title="' . esc_attr__('Edit your profile') . '">' . __('Your Profile') . '</a>'; 
    163  
    164 if ( is_multisite() && is_super_admin() ) { 
    165         if ( !is_network_admin() ) 
    166                 $links[10] = '<a href="' . network_admin_url() . '" title="' . ( ! empty( $update_title ) ? $update_title : esc_attr__('Network Admin') ) . '">' . __('Network Admin') . ( ! empty( $total_update_count ) ? ' (' . number_format_i18n( $total_update_count ) . ')' : '' ) . '</a>'; 
    167         else 
    168                 $links[10] = '<a href="' . get_dashboard_url( get_current_user_id() ) . '" title="' . esc_attr__('Site Admin') . '">' . __('Site Admin') . '</a>'; 
    169 } 
    170  
    171 $links[15] = '<a href="' . wp_logout_url() . '" title="' . esc_attr__('Log Out') . '">' . __('Log Out') . '</a>'; 
    172  
    173 $links = apply_filters( 'admin_user_info_links', $links, $current_user ); 
    174 ksort( $links ); 
    175  
    176 // Trim whitespace and pipes from links, then convert to list items. 
    177 $links = array_map( 'trim', $links, array_fill( 0, count( $links ), " |\n\t" ) ); 
    178  
    179 $howdy = array_shift( $links ); 
    180  
    181 $links_no_js = implode( ' | ', $links ); 
    182 $links_js = '<li>' . implode( '</li><li>', $links ) . '</li>'; 
    183  
    184121?> 
    185122 
    186 <div id="wphead-info"> 
    187 <div id="user_info"> 
    188         <p class="hide-if-js"><?php echo "$howdy | $links_no_js"; ?></p> 
    189  
    190         <div class="hide-if-no-js"> 
    191                 <p><?php echo $howdy; ?></p> 
    192                 <div id="user_info_arrow"></div> 
    193                 <div id="user_info_links_wrap"><div id="user_info_links"> 
    194                         <ul><?php echo $links_js; ?></ul> 
    195                 </div></div> 
    196         </div> 
    197 </div> 
    198 </div> 
    199  
    200 </div> 
    201  
    202123<div id="wpbody"> 
    203124<?php 
    204125unset($title_class, $blog_name, $total_update_count, $update_title); 
  • wp-admin/css/colors-classic.dev.css

    diff --git wp-admin/css/colors-classic.dev.css wp-admin/css/colors-classic.dev.css
    index 2b29eb9..39d777a 100644
     
    11/*------------------------------------------------------------------------------ 
    22 
    33 
    4 Howdy! This is the CSS file that controls the  
     4Howdy! This is the CSS file that controls the 
    55Blue (classic) color style on the WordPress Dashboard. 
    66 
    77This file contains both LTR and RTL styles. 
    table.diff .diff-addedline ins { 
    16641664        background-image: linear-gradient(bottom, #eff8ff, #fff); /* proposed W3C Markup */ 
    16651665} 
    16661666 
    1667 #screen-meta-links a.show-settings { 
    1668         color: #606060; 
    1669 } 
    1670  
    1671 #screen-meta-links a.show-settings:hover { 
    1672         color: #000; 
    1673 } 
    1674  
    16751667#replysubmit { 
    16761668        background-color: #f1f1f1; 
    16771669        border-top-color: #ddd; 
    body.press-this ul.category-tabs li.tabs a { 
    18971889        text-decoration: underline; 
    18981890} 
    18991891 
    1900 #screen-meta a.show-settings, 
    19011892.toggle-arrow { 
    19021893        background: transparent url(../images/arrows-vs.png) no-repeat right 3px; 
    19031894} 
    19041895 
    1905 #screen-meta .screen-meta-active a.show-settings { 
    1906         background: transparent url(../images/arrows-vs.png) no-repeat right -33px; 
    1907 } 
    1908  
    19091896.view-switch #view-switch-list { 
    19101897        background: transparent url(../images/list.png) no-repeat 0 0; 
    19111898} 
    div.widgets-sortables, 
    22562243        background: transparent url(../images/arrows-vs.png) no-repeat 4px 2px; 
    22572244} 
    22582245 
    2259 .rtl #screen-meta a.show-settings, 
    22602246.toggle-arrow { 
    22612247        background: transparent url(../images/arrows-vs.png) no-repeat left 3px; 
    22622248} 
    22632249 
    2264 .rtl #screen-meta .screen-meta-active a.show-settings { 
    2265         background: transparent url(../images/arrows-vs.png) no-repeat left -33px; 
    2266 } 
    2267  
    22682250.rtl .sidebar-name-arrow { 
    22692251        background: transparent url(../images/arrows-vs.png) no-repeat 5px 9px; 
    22702252} 
  • wp-admin/css/colors-fresh.dev.css

    diff --git wp-admin/css/colors-fresh.dev.css wp-admin/css/colors-fresh.dev.css
    index 2db91de..a378bcf 100644
    table.widefat span.spam a, 
    766766        color: #555; 
    767767} 
    768768 
     769#screen-meta { 
     770        background-color: #f1f1f1; 
     771        border-color: #ccc; 
     772} 
     773 
     774 
    769775.login #backtoblog a { 
    770776        color: #464646; 
    771777} 
    table.widefat .spam a:hover, 
    954960 
    955961.expanded #adminmenu li.wp-not-current-submenu:hover a.menu-top, 
    956962.expanded #adminmenu li.wp-not-current-submenu:hover .wp-menu-arrow { 
    957         background-color: #eee; /* Fallback */ 
    958         background-image: -ms-linear-gradient(bottom, #ccc, #eee); /* IE10 */ 
    959         background-image: -moz-linear-gradient(bottom, #ccc, #eee); /* Firefox */ 
    960         background-image: -o-linear-gradient(bottom, #ccc, #eee); /* Opera */ 
    961         background-image: -webkit-gradient(linear, left bottom, left top, from(#ccc), to(#eee)); /* old Webkit */ 
     963        background-color: #e4e4e4; /* Fallback */ 
     964        background-image: -ms-linear-gradient(bottom, #ccc, #e4e4e4); /* IE10 */ 
     965        background-image: -moz-linear-gradient(bottom, #ccc, #e4e4e4); /* Firefox */ 
     966        background-image: -o-linear-gradient(bottom, #ccc, #e4e4e4); /* Opera */ 
     967        background-image: -webkit-gradient(linear, left bottom, left top, from(#ccc), to(#e4e4e4)); /* old Webkit */ 
    962968        background-image: -webkit-linear-gradient(bottom, #ccc, #e4e4e4); /* new Webkit */ 
    963         background-image: linear-gradient(bottom, #ccc, #eee); /* proposed W3C Markup */ 
     969        background-image: linear-gradient(bottom, #ccc, #e4e4e4); /* proposed W3C Markup */ 
    964970        border-top-color: #e4e4e4; 
    965971        border-bottom-color: #ccc; 
    966972        text-shadow: 0 1px 0 rgba( 255, 255, 255, 0.4 ); 
    table.diff .diff-addedline ins { 
    12791285        color: #D54E21; 
    12801286} 
    12811287 
    1282 #screen-options-wrap, 
    1283 #contextual-help-wrap { 
    1284         background-color: #f1f1f1; 
    1285         border-color: #dfdfdf; 
    1286 } 
    1287  
    1288 #screen-options-link-wrap, 
    1289 #contextual-help-link-wrap { 
    1290         background-color: #e3e3e3; /* Fallback */ 
    1291         border-right: 1px solid transparent; 
    1292         border-left: 1px solid transparent; 
    1293         border-bottom: 1px solid transparent; 
    1294         background-image: -ms-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* IE10 */ 
    1295         background-image: -moz-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* Firefox */ 
    1296         background-image: -o-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* Opera */ 
    1297         background-image: -webkit-gradient(linear, left bottom, left top, from(#dfdfdf), to(#f1f1f1)); /* old Webkit */ 
    1298         background-image: -webkit-linear-gradient(bottom, #dfdfdf, #f1f1f1); /* new Webkit */ 
    1299         background-image: linear-gradient(bottom, #dfdfdf, #f1f1f1); /* proposed W3C Markup */ 
    1300 } 
    1301  
    1302 #screen-meta-links a.show-settings { 
    1303         color: #777; 
    1304 } 
    1305  
    1306 #screen-meta-links a.show-settings:hover { 
    1307         color: #000; 
    1308 } 
    1309  
    13101288#replysubmit { 
    13111289        background-color: #f1f1f1; 
    13121290        border-top-color: #ddd; 
    body.press-this ul.category-tabs li.tabs a { 
    15371515        text-decoration: underline; 
    15381516} 
    15391517 
    1540 #screen-meta a.show-settings, 
    1541 .toggle-arrow { 
    1542         background: transparent url(../images/arrows.png) no-repeat right 3px; 
    1543 } 
    1544  
    1545 #screen-meta .screen-meta-active a.show-settings { 
    1546         background: transparent url(../images/arrows.png) no-repeat right -33px; 
    1547 } 
    1548  
    15491518.view-switch #view-switch-list { 
    15501519        background: transparent url(../images/list.png) no-repeat 0 0; 
    15511520} 
    div.widgets-sortables, 
    18891858        background: transparent url(../images/arrows.png) no-repeat 4px 2px; 
    18901859} 
    18911860 
    1892 .rtl #screen-meta a.show-settings, 
    18931861.toggle-arrow { 
    18941862        background: transparent url(../images/arrows.png) no-repeat left 3px; 
    18951863} 
    18961864 
    1897 .rtl #screen-meta .screen-meta-active a.show-settings { 
    1898         background: transparent url(../images/arrows.png) no-repeat left -33px; 
    1899 } 
    1900  
    19011865.rtl .sidebar-name-arrow { 
    19021866        background: transparent url(../images/arrows.png) no-repeat 5px 9px; 
    19031867} 
  • wp-admin/css/wp-admin-rtl.dev.css

    diff --git wp-admin/css/wp-admin-rtl.dev.css wp-admin/css/wp-admin-rtl.dev.css
    index adc49f9..6cd2ab7 100644
    form.upgrade .hint { 
    375375  6.2 - Screen Options Tabs 
    376376------------------------------------------------------------------------------*/ 
    377377 
    378 #screen-meta-links { 
    379         margin: 0 0 0 19px; 
    380 } 
    381  
    382378#screen-meta .screen-reader-text { 
    383379        visibility: hidden; 
    384380} 
    385381 
    386 #screen-options-link-wrap, 
    387 #contextual-help-link-wrap { 
    388         float: left; 
    389         margin: 0 6px 0 0; 
    390         font-family: Tahoma, Arial, sans-serif; 
    391 } 
    392  
    393382#contextual-help-wrap li { 
    394383        list-style-type: disc; 
    395384        margin-left: auto; 
    form.upgrade .hint { 
    401390.toggle-arrow-active { 
    402391        background-position: bottom right; 
    403392} 
    404 #screen-meta a.show-settings { 
    405         padding: 0 6px 0 16px; 
    406 } 
    407393 
    408394#screen-options-wrap, 
    409395#contextual-help-wrap { 
  • wp-admin/css/wp-admin.dev.css

    diff --git wp-admin/css/wp-admin.dev.css wp-admin/css/wp-admin.dev.css
    index 823b45d..300c34e 100644
    code { 
    550550} 
    551551 
    552552.wrap { 
    553         margin: 0 15px 0 0; 
     553        margin: 4px 15px 0 0; 
    554554} 
    555555 
    556556div.updated, 
    form.upgrade .hint { 
    14701470#adminmenu a, 
    14711471#sidemenu a, 
    14721472#taglist a, 
    1473 #catlist a, 
    1474 #show-settings a { 
     1473#catlist a { 
    14751474        text-decoration: none; 
    14761475} 
    14771476 
    form.upgrade .hint { 
    15811580------------------------------------------------------------------------------*/ 
    15821581 
    15831582#screen-meta { 
    1584         position: relative; 
    1585         clear: both; 
    1586 } 
    1587  
    1588 #screen-meta-links { 
    1589         margin: 0 24px 0 0; 
     1583        position: fixed; 
     1584        max-height: 200px; 
     1585        top: -250px; 
     1586        left: 0; 
     1587        right: 0; 
     1588        margin-top: 28px; 
     1589        z-index: 200; 
     1590        max-height: 200px; 
     1591        overflow: auto; 
     1592        border-style: solid; 
     1593        border-width: 0 0 1px; 
    15901594} 
    15911595 
    15921596#screen-meta .screen-reader-text { 
    15931597        visibility: hidden; 
    15941598} 
    15951599 
    1596 #screen-options-link-wrap, 
    1597 #contextual-help-link-wrap { 
    1598         float: right; 
    1599         height: 22px; 
    1600         padding: 0; 
    1601         margin: 0 0 0 6px; 
    1602         font-family: sans-serif; 
    1603         -moz-border-radius-bottomleft: 3px; 
    1604         -moz-border-radius-bottomright: 3px; 
    1605         -webkit-border-bottom-left-radius: 3px; 
    1606         -webkit-border-bottom-right-radius: 3px; 
    1607         border-bottom-left-radius: 3px; 
    1608         border-bottom-right-radius: 3px; 
    1609 } 
    1610  
    16111600#contextual-help-wrap li { 
    16121601        list-style-type: disc; 
    16131602        margin-left: 18px; 
    form.upgrade .hint { 
    16231612.toggle-arrow-active { 
    16241613        background-position: bottom left; 
    16251614} 
    1626 #screen-meta a.show-settings { 
    1627         text-decoration: none; 
    1628         z-index: 1; 
    1629         padding: 0 16px 0 6px; 
    1630         height: 22px; 
    1631         line-height: 22px; 
    1632         font-size: 12px; 
    1633         display: block; 
    1634         text-shadow: rgba(255,255,255,0.7) 0 1px 0; 
    1635 } 
    1636  
    1637 #screen-meta a.show-settings:hover { 
    1638         text-decoration: none; 
    1639 } 
    16401615 
    16411616#screen-options-wrap h5, 
    16421617#contextual-help-wrap h5 { 
    form.upgrade .hint { 
    16461621 
    16471622#screen-options-wrap, 
    16481623#contextual-help-wrap { 
    1649         border-style: none solid solid; 
    1650         border-top: 0 none; 
    1651         border-width: 0 1px 1px; 
    1652         margin: 0 20px 0 0; 
     1624        margin: 0; 
    16531625        padding: 8px 12px 12px; 
    16541626} 
    16551627 
    strong .post-com-count { 
    20702042  8.0 - Layout Blocks 
    20712043------------------------------------------------------------------------------*/ 
    20722044 
    2073 body.admin-bar #wphead, 
     2045body.admin-bar #wpcontent, 
    20742046body.admin-bar #adminmenu { 
    20752047        padding-top: 28px; 
    20762048} 
  • wp-admin/includes/template.php

    diff --git wp-admin/includes/template.php wp-admin/includes/template.php
    index f70e1c5..bad3573 100644
    function screen_meta($screen) { 
    17481748 
    17491749        $show_screen = apply_filters('screen_options_show_screen', $show_screen, $screen); 
    17501750 
     1751        if ( $show_screen ) 
     1752                add_action( 'admin_bar_menu', 'wp_admin_bar_screen_options_menu', 80 ); 
     1753 
     1754 
    17511755?> 
    17521756<div id="screen-meta"> 
    17531757<?php if ( $show_screen ) : ?> 
    function screen_meta($screen) { 
    17941798 
    17951799        echo $screen_options; 
    17961800        echo $settings; ?> 
    1797 <div><?php wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false ); ?></div> 
    1798 </form> 
     1801        <div><?php wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false ); ?></div> 
     1802        </form> 
    17991803</div> 
    18001804 
    18011805<?php endif; // $show_screen 
    function screen_meta($screen) { 
    18201824        ?> 
    18211825        </div> 
    18221826 
    1823 <div id="screen-meta-links"> 
    1824 <div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle"> 
    1825 <a href="#contextual-help" id="contextual-help-link" class="show-settings"><?php _e('Help') ?></a> 
    1826 </div> 
    1827 <?php if ( $show_screen ) { ?> 
    1828 <div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle"> 
    1829 <a href="#screen-options" id="show-settings-link" class="show-settings"><?php _e('Screen Options') ?></a> 
    1830 </div> 
    1831 <?php } ?> 
    1832 </div> 
    1833 </div> 
    1834 <?php 
     1827</div> <?php // #screen-meta 
    18351828} 
    18361829 
    18371830/** 
  • wp-admin/js/common.dev.js

    diff --git wp-admin/js/common.dev.js wp-admin/js/common.dev.js
    index a75cb0b..d00e7db 100644
    showNotice = { 
    182182}; 
    183183 
    184184screenMeta = { 
     185        element: null, 
     186        toggles: null, 
     187        page:    null, 
     188        padding: null, 
     189        top:     null, 
    185190        links: { 
    186                 'screen-options-link-wrap': 'screen-options-wrap', 
    187                 'contextual-help-link-wrap': 'contextual-help-wrap' 
     191                'wp-admin-bar-screen-options': 'screen-options-wrap', 
     192                'wp-admin-bar-help': 'contextual-help-wrap' 
    188193        }, 
    189194        init: function() { 
    190                 $('.screen-meta-toggle').click( screenMeta.toggleEvent ); 
     195                screenMeta.element = $('#screen-meta'); 
     196                screenMeta.toggles = $('.screen-meta-toggle'); 
     197                screenMeta.page    = $('#wpcontent, #adminmenu'); 
     198 
     199                screenMeta.toggles.click( screenMeta.toggleEvent ); 
    191200        }, 
    192201        toggleEvent: function( e ) { 
    193202                var panel; 
    screenMeta = { 
    205214                        screenMeta.open( panel, $(this) ); 
    206215        }, 
    207216        open: function( panel, link ) { 
    208                 $('.screen-meta-toggle').not( link ).css('visibility', 'hidden'); 
     217                // Open selected panels 
     218                link.addClass('selected'); 
    209219 
    210                 panel.slideDown( 'fast', function() { 
    211                         link.addClass('screen-meta-active'); 
    212                 }); 
     220                screenMeta.padding = parseInt( screenMeta.page.css('paddingTop'), 10 ); 
     221                screenMeta.top     = parseInt( screenMeta.element.css('top'), 10 ); 
     222 
     223                panel.show(); 
     224 
     225                screenMeta.element.animate({ top: 0 }, 'fast'); 
     226                screenMeta.page.animate({ paddingTop: screenMeta.padding + screenMeta.element.outerHeight() }, 'fast'); 
    213227        }, 
    214228        close: function( panel, link ) { 
    215                 panel.slideUp( 'fast', function() { 
    216                         link.removeClass('screen-meta-active'); 
    217                         $('.screen-meta-toggle').css('visibility', ''); 
     229                screenMeta.element.animate({ top: screenMeta.top }, 'fast', function() { 
     230                        panel.hide(); 
     231                        link.removeClass('selected'); 
    218232                }); 
     233                screenMeta.page.animate({ paddingTop: screenMeta.padding }, 'fast'); 
    219234        } 
    220235}; 
    221236 
  • wp-includes/admin-bar.php

    diff --git wp-includes/admin-bar.php wp-includes/admin-bar.php
    index 10c8114..39e371b 100644
    function wp_admin_bar_my_account_menu( $wp_admin_bar ) { 
    8282 
    8383        if ( 0 != $user_id ) { 
    8484                /* Add the 'My Account' menu */ 
    85                 $avatar = get_avatar( get_current_user_id(), 16 ); 
    86                 $id = ( ! empty( $avatar ) ) ? 'my-account-with-avatar' : 'my-account'; 
     85                $avatar = get_avatar( get_current_user_id(), 28 ); 
     86                $id     = ( ! empty( $avatar ) ) ? 'my-account-with-avatar' : 'my-account'; 
     87                $howdy  = sprintf( __('Howdy, %1$s'), $user_identity ); 
    8788 
    88                 $wp_admin_bar->add_menu( array( 'id' => $id, 'title' => $avatar . $user_identity,  'href' => get_edit_profile_url( $user_id ) ) ); 
     89                $wp_admin_bar->add_menu( array( 'id' => $id, 'title' => $howdy . $avatar,  'href' => get_edit_profile_url( $user_id ) ) ); 
    8990 
    9091                /* Add the "My Account" sub menus */ 
    9192                $wp_admin_bar->add_menu( array( 'id' => 'edit-profile', 'parent' => $id, 'title' => __( 'Edit My Profile' ), 'href' => get_edit_profile_url( $user_id ) ) ); 
    function wp_admin_bar_my_account_menu( $wp_admin_bar ) { 
    9495} 
    9596 
    9697/** 
    97  * Add the "Dashboard"/"Visit Site" menu. 
     98 * Add the "Blog Name" menu in the front end. 
    9899 * 
    99  * @since 3.2.0 
     100 * @since 3.3.0 
    100101 */ 
    101 function wp_admin_bar_dashboard_view_site_menu( $wp_admin_bar ) { 
    102         $user_id = get_current_user_id(); 
     102function wp_admin_bar_blog_front_menu( $wp_admin_bar ) { 
     103        $blogname = get_bloginfo('name'); 
    103104 
    104         if ( 0 != $user_id ) { 
    105                 if ( is_admin() ) 
    106                         $wp_admin_bar->add_menu( array( 'id' => 'view-site', 'title' => __( 'Visit Site' ), 'href' => home_url() ) ); 
    107                 elseif ( is_multisite() ) 
    108                         $wp_admin_bar->add_menu( array( 'id' => 'dashboard', 'title' => __( 'Dashboard' ), 'href' => get_dashboard_url( $user_id ) ) ); 
    109                 else 
    110                         $wp_admin_bar->add_menu( array( 'id' => 'dashboard', 'title' => __( 'Dashboard' ), 'href' => admin_url() ) ); 
    111         } 
     105        if ( empty( $blogname ) ) 
     106                $blogname = preg_replace( '#^(https?://)?(www.)?#', '', get_home_url() ); 
     107 
     108 
     109        $wp_admin_bar->add_menu( array( 
     110                'id'    => 'blog-name', 
     111                'title' => $blogname, 
     112                'href'  => admin_url(), 
     113        ) ); 
     114 
     115        // Add Dashboard item. 
     116        $wp_admin_bar->add_menu( array( 
     117                'id'     => 'dashboard', 
     118                'title'  => __( 'Dashboard' ), 
     119                'href'   => admin_url(), 
     120                'parent' => 'blog-name', 
     121        ) ); 
     122 
     123        wp_admin_bar_appearance_menu( $wp_admin_bar ); 
     124} 
     125 
     126/** 
     127 * Add the "Blog Name" menu in the admin. 
     128 * 
     129 * @since 3.3.0 
     130 */ 
     131function wp_admin_bar_blog_admin_menu( $wp_admin_bar ) { 
     132        $url      = get_home_url(); 
     133        $blogname = get_bloginfo('name'); 
     134 
     135        if ( empty( $blogname ) ) 
     136                $blogname = preg_replace( '#^(https?://)?(www.)?#', '', $url ); 
     137 
     138 
     139        $wp_admin_bar->add_menu( array( 
     140                'id'    => 'blog-name', 
     141                'title' => $blogname, 
     142                'href'  => $url, 
     143        ) ); 
    112144} 
    113145 
    114146/** 
    function wp_admin_bar_my_sites_menu( $wp_admin_bar ) { 
    120152        global $wpdb; 
    121153 
    122154        /* Add the 'My Sites' menu if the user has more than one site. */ 
    123         if ( count( $wp_admin_bar->user->blogs ) <= 1 ) 
    124                 return; 
     155        // if ( count( $wp_admin_bar->user->blogs ) <= 1 ) 
     156        //      return; 
     157 
     158        $grey_wp_logo_url = admin_url( 'images/wp-logo.png' ); 
    125159 
    126         $wp_admin_bar->add_menu( array(  'id' => 'my-blogs', 'title' => __( 'My Sites' ),  'href' => admin_url( 'my-sites.php' ) ) ); 
     160        $grey_wp_logo = '<img src="' . esc_url( $grey_wp_logo_url ) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>'; 
     161 
     162        if ( is_multisite() ) 
     163                $url = admin_url( 'my-sites.php' ); 
     164        else 
     165                $url = admin_url(); 
     166 
     167        $wp_admin_bar->add_menu( array( 
     168                'id'    => 'my-blogs', 
     169                'title' => $grey_wp_logo, 
     170                'href'  => $url, 
     171        ) ); 
     172 
     173        if ( is_multisite() && is_super_admin() && !is_network_admin() ) { 
     174                $wp_admin_bar->add_menu( array( 
     175                        'parent' => 'my-blogs', 
     176                        'id'     => 'network-admin', 
     177                        'title'  => __('Network Admin'), 
     178                        'href'   => network_admin_url() 
     179                ) ); 
     180        } 
    127181 
    128         $default = includes_url('images/wpmini-blue.png'); 
     182        $blue_wp_logo_url = includes_url('images/wpmini-blue.png'); 
    129183 
    130184        foreach ( (array) $wp_admin_bar->user->blogs as $blog ) { 
     185                // Skip the current blog. 
     186                if ( $blog->userblog_id == $wp_admin_bar->user->active_blog->blog_id ) 
     187                        continue; 
     188 
    131189                // @todo Replace with some favicon lookup. 
    132                 //$blavatar = '<img src="' . esc_url( blavatar_url( blavatar_domain( $blog->siteurl ), 'img', 16, $default ) ) . '" alt="Blavatar" width="16" height="16" />'; 
    133                 $blavatar = '<img src="' . esc_url($default) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>'; 
     190                //$blavatar = '<img src="' . esc_url( blavatar_url( blavatar_domain( $blog->siteurl ), 'img', 16, $blue_wp_logo_url ) ) . '" alt="Blavatar" width="16" height="16" />'; 
     191                $blavatar = '<img src="' . esc_url($blue_wp_logo_url) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>'; 
    134192 
    135193                $blogname = empty( $blog->blogname ) ? $blog->domain : $blog->blogname; 
    136194 
    function wp_admin_bar_comments_menu( $wp_admin_bar ) { 
    280338                return; 
    281339 
    282340        $awaiting_mod = wp_count_comments(); 
    283         $awaiting_mod = $awaiting_mod->moderated; 
     341        $awaiting_mod = number_format_i18n( $awaiting_mod->moderated ); 
    284342 
    285         $awaiting_mod = $awaiting_mod ? "<span id='ab-awaiting-mod' class='pending-count'>" . number_format_i18n( $awaiting_mod ) . "</span>" : ''; 
    286         $wp_admin_bar->add_menu( array( 'id' => 'comments', 'title' => sprintf( __('Comments %s'), $awaiting_mod ), 'href' => admin_url('edit-comments.php') ) ); 
     343        $bubble  = "<div class='ab-comments-bubble'>"; 
     344        $bubble .= "<div class='ab-comments-count'>$awaiting_mod</div>"; 
     345        $bubble .= "<div class='ab-comments-arrow'></div>"; 
     346        $bubble .= "</div>"; 
     347 
     348        $wp_admin_bar->add_menu( array( 
     349                'id'    => 'comments', 
     350                'title' => $bubble, 
     351                'href'  => admin_url('edit-comments.php'), 
     352        ) ); 
    287353} 
    288354 
    289355/** 
    function wp_admin_bar_appearance_menu( $wp_admin_bar ) { 
    296362        if ( ! current_user_can('switch_themes') && ! current_user_can( 'edit_theme_options' ) ) 
    297363                return; 
    298364 
    299         $wp_admin_bar->add_menu( array( 'id' => 'appearance', 'title' => __('Appearance'), 'href' => admin_url('themes.php') ) ); 
     365        $wp_admin_bar->add_menu( array( 
     366                'id'     => 'appearance', 
     367                'title'  => __('Appearance'), 
     368                'href'   => admin_url('themes.php'), 
     369                'parent' => 'blog-name', 
     370        ) ); 
    300371 
    301372        if ( ! current_user_can( 'edit_theme_options' ) ) 
    302373                return; 
    function wp_admin_bar_updates_menu( $wp_admin_bar ) { 
    337408} 
    338409 
    339410/** 
     411 * Add screen options link. 
     412 * 
     413 * @since 3.3.0 
     414 */ 
     415function wp_admin_bar_screen_options_menu( $wp_admin_bar ) { 
     416        $wp_admin_bar->add_menu( array( 
     417                'id'    => 'screen-options', 
     418                'title' => __('Screen Options'), 
     419                'href'  => '#', 
     420                'meta'  => array( 
     421                        'class' => 'screen-meta-toggle hide-if-no-js', 
     422                ), 
     423        ) ); 
     424} 
     425 
     426/** 
     427 * Add help link. 
     428 * 
     429 * @since 3.3.0 
     430 */ 
     431function wp_admin_bar_help_menu( $wp_admin_bar ) { 
     432        $wp_admin_bar->add_menu( array( 
     433                'id'    => 'help', 
     434                'title' => __('Help'), 
     435                'href'  => '#', 
     436                'meta'  => array( 
     437                        'class' => 'screen-meta-toggle hide-if-no-js', 
     438                ), 
     439        ) ); 
     440} 
     441 
     442/** 
     443 * Add search form. 
     444 * 
     445 * @since 3.3.0 
     446 */ 
     447function wp_admin_bar_search_menu( $wp_admin_bar ) { 
     448        $form  = '<div id="adminbarsearch-wrap">'; 
     449        $form .= '<form action="' . home_url() . '" method="get" id="adminbarsearch">'; 
     450        $form .= '<input class="adminbar-input" name="s" id="adminbar-search"'; 
     451        $form .= 'type="text" value="" maxlength="150" placeholder="' . esc_attr__( 'Search' ) . '" />'; 
     452        $form .= '<input type="submit" class="adminbar-button" value="' . __('Search') . '"/>'; 
     453        $form .= '</form>'; 
     454        $form .= '</div>'; 
     455 
     456        $wp_admin_bar->add_menu( array( 
     457                'id'    => 'search', 
     458                'title' => $form, 
     459                'href'  => '#', 
     460                'meta'  => array( 
     461                        'class'   => 'admin-bar-search', 
     462                        // @TODO: Replace me with something far less hacky 
     463                        'onclick' => 'if ( event.target.value != "Search" ) { return false; }', 
     464                ), 
     465        ) ); 
     466} 
     467 
     468/** 
    340469 * Style and scripts for the admin bar. 
    341470 * 
    342471 * @since 3.1.0 
    function _get_admin_bar_pref( $context, $user = 0 ) { 
    422551        return 'true' === $pref; 
    423552} 
    424553 
    425 ?> 
    426  No newline at end of file 
     554?> 
  • wp-includes/class-wp-admin-bar.php

    diff --git wp-includes/class-wp-admin-bar.php wp-includes/class-wp-admin-bar.php
    index 02156c1..d365e11 100644
    class WP_Admin_Bar { 
    9797                                        <?php endforeach; ?> 
    9898                                </ul> 
    9999                        </div> 
    100  
    101                         <div id="adminbarsearch-wrap"> 
    102                                 <form action="<?php echo home_url(); ?>" method="get" id="adminbarsearch"> 
    103                                         <input class="adminbar-input" name="s" id="adminbar-search" type="text" value="" maxlength="150" /> 
    104                                         <input type="submit" class="adminbar-button" value="<?php _e('Search'); ?>"/> 
    105                                 </form> 
    106                         </div> 
    107100                </div> 
    108101 
    109102                <?php 
    class WP_Admin_Bar { 
    183176        function add_menus() { 
    184177                add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 10 ); 
    185178                add_action( 'admin_bar_menu', 'wp_admin_bar_my_sites_menu', 20 ); 
    186                 add_action( 'admin_bar_menu', 'wp_admin_bar_dashboard_view_site_menu', 25 ); 
    187179                add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 30 ); 
    188                 add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 80 ); 
    189180                add_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 70 ); 
     181                add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 80 ); 
    190182 
    191                 if ( !is_network_admin() && !is_user_admin() ) { 
     183                if ( ! is_admin() ) { 
     184                        add_action( 'admin_bar_menu', 'wp_admin_bar_blog_front_menu', 25 ); 
    192185                        add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 40 ); 
    193186                        add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 50 ); 
    194                         add_action( 'admin_bar_menu', 'wp_admin_bar_appearance_menu', 60 ); 
     187                        add_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 100 ); 
     188                } else { 
     189                        add_action( 'admin_bar_menu', 'wp_admin_bar_blog_admin_menu', 25 ); 
     190                        add_action( 'admin_bar_menu', 'wp_admin_bar_help_menu', 90 ); 
    195191                } 
    196192 
    197193                do_action( 'add_admin_bar_menus' ); 
  • wp-includes/css/admin-bar.dev.css

    diff --git wp-includes/css/admin-bar.dev.css wp-includes/css/admin-bar.dev.css
    index 32e2845..174864b 100644
     
    1919 
    2020#wpadminbar a, 
    2121#wpadminbar a:hover, 
    22 #wpadminbar a img,  
     22#wpadminbar a img, 
    2323#wpadminbar a img:hover { 
    2424        outline: none; 
    2525        border: none; 
     
    7070        border-right: none; 
    7171} 
    7272 
    73 #wpadminbar .quicklinks > ul > li:hover > a { 
     73#wpadminbar .quicklinks > ul > li:hover > a, 
     74#wpadminbar .quicklinks > ul > li.selected > a { 
    7475        border-left-color: #707070; 
    7576} 
    7677 
     
    159160 
    160161#wpadminbar .quicklinks .menupop a > span { 
    161162        display: inline; 
    162         background: url(../images/admin-bar-sprite.png?d=11122010) right -58px no-repeat; 
     163        background: url(../images/admin-bar-sprite.png?d=11122010) right -57px no-repeat; 
    163164        padding-right: .8em; 
    164165} 
    165166 
     
    169170        padding-right: 1.5em; 
    170171} 
    171172 
    172 #wpadminbar .quicklinks a span#ab-awaiting-mod, 
    173173#wpadminbar .quicklinks a span#ab-updates { 
    174174        background: #eee; 
    175175        color: #333; 
     
    184184        border-radius: 10px; 
    185185} 
    186186 
    187 #wpadminbar .quicklinks a:hover span#ab-awaiting-mod, 
    188187#wpadminbar .quicklinks a:hover span#ab-updates  { 
    189188        background: #fff; 
    190189        color: #000; 
    191190} 
    192191 
     192#wpadminbar #wp-admin-bar-my-account, 
     193#wpadminbar #wp-admin-bar-my-account-with-avatar { 
     194        float: right; 
     195} 
     196 
    193197#wpadminbar .quicklinks li#wp-admin-bar-my-account > a { 
    194198        border-left: none; 
    195199} 
    196200 
    197201#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar > a { 
    198202        border-left: none; 
    199         background: url(../images/admin-bar-sprite.png?d=11122010) top left no-repeat; 
     203        background: url(../images/admin-bar-sprite.png?d=11122010) top right no-repeat; 
     204        margin-right: -7px; 
     205        padding-right: 48px; 
    200206} 
    201207 
    202208#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar > a img { 
    203209        width: 16px; 
    204210        height: 16px; 
    205         display: inline; 
    206211        border: 1px solid #999; 
    207         vertical-align: middle; 
    208         margin: -2px 23px 0 -5px; 
     212        position: absolute; 
     213        right: 6px; 
     214        top: 5px; 
    209215        padding: 0; 
    210216        background: #eee; 
    211         float: none; 
    212217} 
    213218 
    214219#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul { 
    215         left: 30px; 
     220/*      left: 30px;*/ 
    216221} 
    217222 
    218 #wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul ul {  
    219         left: 0;  
     223#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul ul { 
     224        left: 0; 
    220225} 
    221226 
    222 #wpadminbar .quicklinks .menupop li a img.blavatar { 
     227#wpadminbar .quicklinks li img.blavatar { 
    223228        vertical-align: middle; 
    224         margin: 0 8px 0 0; 
     229        margin: -3px 4px 0 0; 
    225230        padding: 0; 
    226231} 
    227232 
     233#wpadminbar #wp-admin-bar-search a { 
     234        padding: 0; 
     235} 
     236 
     237#wpadminbar .quicklinks .admin-bar-search:hover { 
     238        /* default background */ 
     239        background: transparent; 
     240} 
     241#wpadminbar .quicklinks .admin-bar-search:hover > a { 
     242        /* default borders */ 
     243        border-right: none; 
     244        border-left: 1px solid #808080; 
     245} 
     246 
    228247#wpadminbar #adminbarsearch { 
    229248        float: right; 
    230         height: 18px; 
    231         padding: 3px; 
     249        height: 26px; 
     250        padding: 2px 4px; 
     251/*      padding: 0;*/ 
    232252        margin: 0; 
    233253} 
    234254 
    235255#wpadminbar #adminbarsearch .adminbar-input { 
     256        height: 23px; 
    236257        width: 140px; 
    237         height: auto; 
    238258        float: left; 
    239         font: 12px Arial, Helvetica, sans-serif; 
     259        font: 13px Arial, Helvetica, sans-serif; 
    240260        color: #555; 
    241261        text-shadow: 0 1px 0 #fff; 
    242         border: 1px solid #626262; 
    243         padding: 2px 3px; 
     262        border: none; 
     263        padding: 0 3px 0 24px; 
    244264        margin: 0 3px 0 0; 
    245         background: #ddd; 
    246         -moz-box-shadow: inset 2px 2px 1px #cdcdcd; 
    247         -webkit-box-shadow: inset 2px 2px 1px #cdcdcd; 
    248         box-shadow: inset 2px 2px 1px #cdcdcd; 
    249         -webkit-border-radius: 0; 
    250         -khtml-border-radius: 0; 
    251         -moz-border-radius: 0; 
    252         border-radius: 0; 
     265 
     266        background-color: rgba( 255, 255, 255, 0 ); 
     267        background-image: url('../../wp-content/themes/twentyeleven/images/search.png'); 
     268        background-repeat: no-repeat; 
     269        background-position: 4px 2px; 
     270 
     271        -webkit-border-radius: 3px; 
     272        -khtml-border-radius: 3px; 
     273        -moz-border-radius: 3px; 
     274        border-radius: 3px; 
     275 
     276        -moz-box-shadow: none; 
     277        -webkit-box-shadow: none; 
     278        box-shadow: none; 
     279 
    253280        -moz-box-sizing: border-box; 
    254281        -webkit-box-sizing: border-box; 
    255282        -ms-box-sizing: border-box; 
    256283        box-sizing: border-box; 
    257284        outline: none; 
     285 
     286        -webkit-transition-duration: 400ms; 
     287        -webkit-transition-property: width, background; 
     288        -webkit-transition-timing-function: ease; 
     289        -moz-transition-duration: 400ms; 
     290        -moz-transition-property: width, background; 
     291        -moz-transition-timing-function: ease; 
     292        -o-transition-duration: 400ms; 
     293        -o-transition-property: width, background; 
     294        -o-transition-timing-function: ease; 
    258295} 
    259296 
     297#wpadminbar #adminbarsearch .adminbar-input:focus { 
     298        width: 200px; 
     299        background-color: rgba( 255, 255, 255, 0.9 ); 
     300} 
     301 
     302/* Two rules to ensure browser recognition */ 
     303#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { 
     304        color: #e4e4e4; 
     305} 
     306#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { 
     307        color: #e4e4e4; 
     308} 
     309 
     310 
    260311#wpadminbar #adminbarsearch .adminbar-button { 
    261         font: bold 12px Arial, Helvetica, sans-serif; 
    262         color: #444; 
    263         text-shadow: 0px 1px 0px #eee; 
    264         cursor: pointer; 
    265         float: left; 
    266         background: #aaa; 
    267         background: -moz-linear-gradient(bottom,  #aaa,  #cecece); 
    268         background: -webkit-gradient(linear, left bottom, left top, from(#aaa), to(#cecece)); 
    269         -webkit-border-radius: 10px; 
    270         -khtml-border-radius: 10px; 
    271         -moz-border-radius: 10px; 
    272         border-radius: 10px; 
    273         border: 1px solid #626262; 
    274         padding: 2px 13px; 
    275         margin: 0; 
    276         width: auto; 
    277         height: auto; 
     312        display: none; 
    278313} 
    279314 
    280315#wpadminbar #adminbarsearch .adminbar-button:active { 
     
    294329        border: none; 
    295330} 
    296331 
     332/** 
     333 * Comments bubble 
     334 */ 
     335#wpadminbar .ab-comments-bubble { 
     336        position: relative; 
     337        padding-top: 5px; 
     338} 
     339#wpadminbar .ab-comments-count { 
     340        background: #ddd; 
     341        color: #555; 
     342        text-shadow: none; 
     343        height: 1.2em; 
     344        line-height: 1.2em; 
     345        padding: 2px 8px 0; 
     346        font-size: 12px; 
     347        font-weight: bold; 
     348        -moz-border-radius: 10px; 
     349        -khtml-border-radius: 10px; 
     350        -webkit-border-radius: 10px; 
     351        border-radius: 10px; 
     352} 
     353 
     354#wpadminbar a:hover .ab-comments-count { 
     355        background: #fff; 
     356        color: #333; 
     357} 
     358 
     359#wpadminbar a .ab-comments-arrow { 
     360        height: 0; 
     361        position: absolute; 
     362        bottom: -4px; 
     363        left: 6px; 
     364        /* Use transparent borders to form a triangle */ 
     365        border-left: 5px solid #ddd; 
     366        border-bottom: 5px solid transparent; 
     367} 
     368#wpadminbar a:hover .ab-comments-arrow { 
     369        border-left-color: #fff; 
     370} 
     371 
    297372 
    298373/** 
    299374 * IE 6-targeted rules