Make WordPress Core

Changeset 18696


Ignore:
Timestamp:
09/17/2011 01:11:52 AM (13 years ago)
Author:
koopersmith
Message:

Improve comments item in admin bar. see #18197.

Location:
trunk/wp-includes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r18695 r18696  
    191191        // Add blog links
    192192        $blue_wp_logo_url = includes_url('images/wpmini-blue.png');
    193    
     193
    194194        foreach ( (array) $wp_admin_bar->user->blogs as $blog ) {
    195195            // Skip the current blog (unless we're in the network/user admin).
     
    197197                continue;
    198198            }
    199    
     199
    200200            // @todo Replace with some favicon lookup.
    201201            //$blavatar = '<img src="' . esc_url( blavatar_url( blavatar_domain( $blog->siteurl ), 'img', 16, $blue_wp_logo_url ) ) . '" alt="Blavatar" width="16" height="16" />';
    202202            $blavatar = '<img src="' . esc_url($blue_wp_logo_url) . '" alt="' . esc_attr__( 'Blavatar' ) . '" width="16" height="16" class="blavatar"/>';
    203    
     203
    204204            $blogname = empty( $blog->blogname ) ? $blog->domain : $blog->blogname;
    205    
     205
    206206            $wp_admin_bar->add_menu( array( 'parent' => 'my-blogs', 'id' => 'blog-' . $blog->userblog_id, 'title' => $blavatar . $blogname,  'href' => get_admin_url($blog->userblog_id) ) );
    207207            $wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-d', 'title' => __( 'Dashboard' ), 'href' => get_admin_url($blog->userblog_id) ) );
    208    
     208
    209209            if ( current_user_can_for_blog( $blog->userblog_id, 'edit_posts' ) ) {
    210210                $wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-n', 'title' => __( 'New Post' ), 'href' => get_admin_url($blog->userblog_id, 'post-new.php') ) );
    211211                $wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-c', 'title' => __( 'Manage Comments' ), 'href' => get_admin_url($blog->userblog_id, 'edit-comments.php') ) );
    212212            }
    213    
     213
    214214            $wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-v', 'title' => __( 'Visit Site' ), 'href' => get_home_url($blog->userblog_id) ) );
    215215        }
     
    359359
    360360    $awaiting_mod = wp_count_comments();
    361     $awaiting_mod = number_format_i18n( $awaiting_mod->moderated );
    362 
    363     $bubble  = "<div class='ab-comments-bubble'>";
    364     $bubble .= "<div class='ab-comments-count'>$awaiting_mod</div>";
    365     $bubble .= "<div class='ab-comments-arrow'></div>";
    366     $bubble .= "</div>";
     361    $awaiting_mod = $awaiting_mod->moderated;
     362
     363    $icon  = "<div class='ab-comments-icon'>";
     364    $icon .= "<div class='ab-comments-icon-body'></div>";
     365    $icon .= "<div class='ab-comments-icon-arrow'></div>";
     366    $icon .= "</div>";
     367
     368    if ( $awaiting_mod )
     369        $title = sprintf( _n('%d Comment', '%d Comments', $awaiting_mod ), number_format_i18n( $awaiting_mod ) );
     370    else
     371        $title = __('Comments');
    367372
    368373    $wp_admin_bar->add_menu( array(
    369374        'id'    => 'comments',
    370         'title' => $bubble,
     375        'title' => $icon . $title,
    371376        'href'  => admin_url('edit-comments.php'),
    372377    ) );
  • trunk/wp-includes/css/admin-bar.css

    r18695 r18696  
    1 #wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-transform:none;letter-spacing:normal;line-height:1;font:normal 12px/28px "Helvetica Neue",sans-serif;color:#ccc;text-shadow:#444 0 -1px 0;}#wpadminbar :before,#wpadminbar :after{content:normal;}#wpadminbar a,#wpadminbar a:hover,#wpadminbar a img,#wpadminbar a img:hover{outline:none;border:none;text-decoration:none;background:none;}#wpadminbar{direction:ltr;color:#ccc;font:normal 12px/28px "Helvetica Neue",sans-serif;height:28px;position:fixed;top:0;left:0;width:100%;z-index:99999;min-width:960px;background-color:#464646;background-image:-ms-linear-gradient(bottom,#464646,#373737 5px);background-image:-moz-linear-gradient(bottom,#464646,#373737 5px);background-image:-o-linear-gradient(bottom,#464646,#373737);background-image:-webkit-gradient(linear,left bottom,left top,from(#464646),to(#373737));background-image:-webkit-linear-gradient(bottom,#373737,#464646 5px);background-image:linear-gradient(bottom,#464646,#373737);}#wpadminbar ul,#wpadminbar ul li{background:none;list-style:none;margin:0;padding:0;position:relative;z-index:99999;}#wpadminbar .quicklinks ul{text-align:left;}#wpadminbar .quicklinks ul li{float:left;}#wpadminbar .quicklinks>ul>li>a{border-right:1px solid #555;border-left:1px solid #333;}#wpadminbar .quicklinks>ul>li:last-child>a{border-right:none;}#wpadminbar .quicklinks a,#wpadminbar .shortlink-input{height:28px;display:block;padding:0 .85em;margin:0;}#wpadminbar .quicklinks a>span{line-height:28px;}#wpadminbar .quicklinks .menupop ul,#wpadminbar .shortlink-input{margin:0 0 0 1px;padding:6px 0;-moz-box-shadow:0 4px 8px rgba(0,0,0,0.2);-webkit-box-shadow:0 4px 8px rgba(0,0,0,0.2);box-shadow:0 4px 8px rgba(0,0,0,0.2);background:#fff;display:none;position:absolute;border-top:none;float:none;}#wpadminbar .selected .shortlink-input{display:block;}#wpadminbar .quicklinks .menupop ul li{float:none;}#wpadminbar .quicklinks .menupop ul li a strong{font-weight:bold;}#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a span,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .shortlink-input{line-height:26px;height:26px;color:#21759B;text-shadow:none;white-space:nowrap;min-width:140px;}#wpadminbar .shortlink-input{width:200px;}#wpadminbar.nojq .quicklinks li:hover>ul,#wpadminbar .quicklinks li.hover>ul{display:block;}#wpadminbar .quicklinks .menupop li:hover>ul,#wpadminbar .quicklinks .menupop li.hover>ul{margin-left:100%;margin-top:-28px;}#wpadminbar .quicklinks li:hover,#wpadminbar .quicklinks .selected{background-color:#fff;}#wpadminbar .quicklinks li:hover a,#wpadminbar .quicklinks .selected a,#wpadminbar .quicklinks li:hover span,#wpadminbar .quicklinks .selected span{color:#333;text-shadow:none;}#wpadminbar .quicklinks .menupop li:hover{background:#f8fbfe;}#wpadminbar .quicklinks .menupop a>span{display:inline;background:url(../images/admin-bar-sprite.png?d=11122010) right -58px no-repeat;padding-right:.8em;}#wpadminbar .quicklinks .menupop ul li a>span{display:block;background:url(../images/admin-bar-sprite.png?d=11122010) right -29px no-repeat;padding-right:1.5em;}#wpadminbar .quicklinks a span#ab-updates{background:#eee;color:#333;text-shadow:none;display:inline;padding:2px 5px;font-size:10px;font-weight:bold;-moz-border-radius:10px;-khtml-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;}#wpadminbar .quicklinks a:hover span#ab-updates{background:#fff;color:#000;}#wpadminbar #wp-admin-bar-my-account,#wpadminbar #wp-admin-bar-my-account-with-avatar{float:right;}#wpadminbar .quicklinks li#wp-admin-bar-my-account>a{border:none;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar>a{border:none;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar>a img{width:16px;height:16px;border:1px solid #999;padding:0;background:#eee;line-height:24px;vertical-align:middle;margin:-2px 0 0 6px;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul ul{left:0;}#wpadminbar .quicklinks li img.blavatar{vertical-align:middle;margin:-3px 4px 0 0;padding:0;}#wpadminbar #wp-admin-bar-search a{padding:0;}#wpadminbar .quicklinks .admin-bar-search:hover{background:transparent;}#wpadminbar .quicklinks .admin-bar-search:hover>a{border-right:none;border-left:1px solid #333;}#wpadminbar #adminbarsearch{float:right;height:26px;padding:2px 4px;margin:0;}#wpadminbar #adminbarsearch .adminbar-input{height:23px;width:140px;float:left;font:12px "Helvetica Neue",sans-serif;border:none;padding:0 3px 0 24px;margin:0 3px 0 0;color:#ccc;text-shadow:#444 0 -1px 0;background-color:rgba(255,255,255,0);background-image:url('../../wp-content/themes/twentyeleven/images/search.png');background-repeat:no-repeat;background-position:4px 2px;-webkit-border-radius:3px;-khtml-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-transition-duration:400ms;-webkit-transition-property:width,background;-webkit-transition-timing-function:ease;-moz-transition-duration:400ms;-moz-transition-property:width,background;-moz-transition-timing-function:ease;-o-transition-duration:400ms;-o-transition-property:width,background;-o-transition-timing-function:ease;}#wpadminbar #adminbarsearch .adminbar-input:focus{color:#555;text-shadow:0 1px 0 #fff;width:200px;background-color:rgba(255,255,255,0.9);}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#ddd;}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#ddd;}#wpadminbar #adminbarsearch .adminbar-button{display:none;}#wpadminbar #adminbarsearch .adminbar-button:active{background:#a0a0a0;background:-moz-linear-gradient(bottom,#a0a0a0,#c1c1c1);background:-webkit-gradient(linear,left bottom,left top,from(#a0a0a0),to(#c1c1c1));-moz-box-shadow:inset 1px 1px 1px #9b9b9b;-webkit-box-shadow:inset 1px 1px 1px #9b9b9b;box-shadow:inset 1px 1px 1px #9b9b9b;}#wpadminbar #adminbarsearch .adminbar-button:hover{color:#000;}#wpadminbar #adminbarsearch .adminbar-button::-moz-focus-inner{border:none;}#wpadminbar .wp-admin-bar-logo{background:url(../images/wp-logo-white.png) no-repeat 8px 6px;}#wpadminbar .wp-admin-bar-logo>a{padding-left:22px;}#wpadminbar .wp-admin-bar-logo:hover{background:url(../images/wp-logo-dark.png) no-repeat 8px 6px;}#wpadminbar .ab-comments-bubble{position:relative;padding-top:5px;}#wpadminbar .ab-comments-count{background:#ccc;color:#555;text-shadow:none;height:1.2em;line-height:1.2em;padding:0 8px 0;font-size:12px;font-weight:bold;-moz-border-radius:10px;-khtml-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;}#wpadminbar a:hover .ab-comments-count{background:#bbb;color:#333;}#wpadminbar a .ab-comments-arrow{height:0;position:absolute;bottom:-4px;left:6px;border-left:5px solid #ccc;border-bottom:5px solid transparent;}#wpadminbar a:hover .ab-comments-arrow{border-left-color:#bbb;}* html #wpadminbar{overflow:hidden;position:absolute;}* html #wpadminbar .quicklinks ul li a{float:left;}* html #wpadminbar .menupop a span{background-image:none;}
     1#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-transform:none;letter-spacing:normal;line-height:1;font:normal 12px/28px "Helvetica Neue",sans-serif;color:#ccc;text-shadow:#444 0 -1px 0;}#wpadminbar :before,#wpadminbar :after{content:normal;}#wpadminbar a,#wpadminbar a:hover,#wpadminbar a img,#wpadminbar a img:hover{outline:none;border:none;text-decoration:none;background:none;}#wpadminbar{direction:ltr;color:#ccc;font:normal 12px/28px "Helvetica Neue",sans-serif;height:28px;position:fixed;top:0;left:0;width:100%;z-index:99999;min-width:960px;background-color:#464646;background-image:-ms-linear-gradient(bottom,#464646,#373737 5px);background-image:-moz-linear-gradient(bottom,#464646,#373737 5px);background-image:-o-linear-gradient(bottom,#464646,#373737);background-image:-webkit-gradient(linear,left bottom,left top,from(#464646),to(#373737));background-image:-webkit-linear-gradient(bottom,#373737,#464646 5px);background-image:linear-gradient(bottom,#464646,#373737);}#wpadminbar ul,#wpadminbar ul li{background:none;list-style:none;margin:0;padding:0;position:relative;z-index:99999;}#wpadminbar .quicklinks ul{text-align:left;}#wpadminbar .quicklinks ul li{float:left;}#wpadminbar .quicklinks>ul>li>a{border-right:1px solid #555;border-left:1px solid #333;}#wpadminbar .quicklinks>ul>li:last-child>a{border-right:none;}#wpadminbar .quicklinks a,#wpadminbar .shortlink-input{height:28px;display:block;padding:0 .85em;margin:0;}#wpadminbar .quicklinks a>span{line-height:28px;}#wpadminbar .quicklinks .menupop ul,#wpadminbar .shortlink-input{margin:0 0 0 1px;padding:6px 0;-moz-box-shadow:0 4px 8px rgba(0,0,0,0.2);-webkit-box-shadow:0 4px 8px rgba(0,0,0,0.2);box-shadow:0 4px 8px rgba(0,0,0,0.2);background:#fff;display:none;position:absolute;border-top:none;float:none;}#wpadminbar .selected .shortlink-input{display:block;}#wpadminbar .quicklinks .menupop ul li{float:none;}#wpadminbar .quicklinks .menupop ul li a strong{font-weight:bold;}#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a span,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .shortlink-input{line-height:26px;height:26px;color:#21759B;text-shadow:none;white-space:nowrap;min-width:140px;}#wpadminbar .shortlink-input{width:200px;}#wpadminbar.nojq .quicklinks li:hover>ul,#wpadminbar .quicklinks li.hover>ul{display:block;}#wpadminbar .quicklinks .menupop li:hover>ul,#wpadminbar .quicklinks .menupop li.hover>ul{margin-left:100%;margin-top:-28px;}#wpadminbar .quicklinks li:hover,#wpadminbar .quicklinks .selected{background-color:#fff;}#wpadminbar .quicklinks li:hover a,#wpadminbar .quicklinks .selected a,#wpadminbar .quicklinks li:hover span,#wpadminbar .quicklinks .selected span{color:#333;text-shadow:none;}#wpadminbar .quicklinks .menupop li:hover{background:#f8fbfe;}#wpadminbar .quicklinks .menupop a>span{display:inline;background:url(../images/admin-bar-sprite.png?d=11122010) right -58px no-repeat;padding-right:.8em;}#wpadminbar .quicklinks .menupop ul li a>span{display:block;background:url(../images/admin-bar-sprite.png?d=11122010) right -29px no-repeat;padding-right:1.5em;}#wpadminbar .quicklinks a span#ab-updates{background:#eee;color:#333;text-shadow:none;display:inline;padding:2px 5px;font-size:10px;font-weight:bold;-moz-border-radius:10px;-khtml-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;}#wpadminbar .quicklinks a:hover span#ab-updates{background:#fff;color:#000;}#wpadminbar #wp-admin-bar-my-account,#wpadminbar #wp-admin-bar-my-account-with-avatar{float:right;}#wpadminbar .quicklinks li#wp-admin-bar-my-account>a{border:none;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar>a{border:none;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar>a img{width:16px;height:16px;border:1px solid #999;padding:0;background:#eee;line-height:24px;vertical-align:middle;margin:-2px 0 0 6px;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul ul{left:0;}#wpadminbar .quicklinks li img.blavatar{vertical-align:middle;margin:-3px 4px 0 0;padding:0;}#wpadminbar #wp-admin-bar-search a{padding:0;}#wpadminbar .quicklinks .admin-bar-search:hover{background:transparent;}#wpadminbar .quicklinks .admin-bar-search:hover>a{border-right:none;border-left:1px solid #333;}#wpadminbar #adminbarsearch{float:right;height:26px;padding:2px 4px;margin:0;}#wpadminbar #adminbarsearch .adminbar-input{height:23px;width:140px;float:left;font:12px "Helvetica Neue",sans-serif;border:none;padding:0 3px 0 24px;margin:0 3px 0 0;color:#ccc;text-shadow:#444 0 -1px 0;background-color:rgba(255,255,255,0);background-image:url('../../wp-content/themes/twentyeleven/images/search.png');background-repeat:no-repeat;background-position:4px 2px;-webkit-border-radius:3px;-khtml-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-transition-duration:400ms;-webkit-transition-property:width,background;-webkit-transition-timing-function:ease;-moz-transition-duration:400ms;-moz-transition-property:width,background;-moz-transition-timing-function:ease;-o-transition-duration:400ms;-o-transition-property:width,background;-o-transition-timing-function:ease;}#wpadminbar #adminbarsearch .adminbar-input:focus{color:#555;text-shadow:0 1px 0 #fff;width:200px;background-color:rgba(255,255,255,0.9);}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#ddd;}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#ddd;}#wpadminbar #adminbarsearch .adminbar-button{display:none;}#wpadminbar #adminbarsearch .adminbar-button:active{background:#a0a0a0;background:-moz-linear-gradient(bottom,#a0a0a0,#c1c1c1);background:-webkit-gradient(linear,left bottom,left top,from(#a0a0a0),to(#c1c1c1));-moz-box-shadow:inset 1px 1px 1px #9b9b9b;-webkit-box-shadow:inset 1px 1px 1px #9b9b9b;box-shadow:inset 1px 1px 1px #9b9b9b;}#wpadminbar #adminbarsearch .adminbar-button:hover{color:#000;}#wpadminbar #adminbarsearch .adminbar-button::-moz-focus-inner{border:none;}#wpadminbar .wp-admin-bar-logo{background:url(../images/wp-logo-white.png) no-repeat 8px 6px;}#wpadminbar .wp-admin-bar-logo>a{padding-left:22px;}#wpadminbar .wp-admin-bar-logo:hover{background:url(../images/wp-logo-dark.png) no-repeat 8px 6px;}#wpadminbar .ab-comments-icon{position:relative;padding-top:5px;float:left;}#wpadminbar .ab-comments-icon-body{margin:3px 4px 0 -2px;background:#999;height:10px;width:14px;-moz-border-radius:10px;-khtml-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;}#wpadminbar a:hover .ab-comments-icon-body{background:#bbb;color:#555;}#wpadminbar a .ab-comments-icon-arrow{height:0;position:absolute;bottom:-3px;left:1px;border-left:4px solid #999;border-bottom:4px solid transparent;}#wpadminbar a:hover .ab-comments-icon-arrow{border-left-color:#bbb;}* html #wpadminbar{overflow:hidden;position:absolute;}* html #wpadminbar .quicklinks ul li a{float:left;}* html #wpadminbar .menupop a span{background-image:none;}
  • trunk/wp-includes/css/admin-bar.dev.css

    r18695 r18696  
    346346
    347347/**
    348  * Comments bubble
     348 * Comments icon
    349349 */
    350 #wpadminbar .ab-comments-bubble {
     350#wpadminbar .ab-comments-icon {
    351351    position: relative;
    352352    padding-top: 5px;
    353 }
    354 #wpadminbar .ab-comments-count {
    355     background: #ccc;
    356     color: #555;
    357     text-shadow: none;
    358     height: 1.2em;
    359     line-height: 1.2em;
    360     padding: 0 8px 0;
    361     font-size: 12px;
    362     font-weight: bold;
     353    float: left;
     354}
     355#wpadminbar .ab-comments-icon-body {
     356    margin: 3px 4px 0 -2px;
     357    background: #999;
     358    height: 10px;
     359    width: 14px;
     360
    363361    -moz-border-radius: 10px;
    364362    -khtml-border-radius: 10px;
     
    367365}
    368366
    369 #wpadminbar a:hover .ab-comments-count {
     367#wpadminbar a:hover .ab-comments-icon-body {
    370368    background: #bbb;
    371     color: #333;
    372 }
    373 
    374 #wpadminbar a .ab-comments-arrow {
     369    color: #555;
     370}
     371
     372#wpadminbar a .ab-comments-icon-arrow {
    375373    height: 0;
    376374    position: absolute;
    377     bottom: -4px;
    378     left: 6px;
     375    bottom: -3px;
     376    left: 1px;
    379377    /* Use transparent borders to form a triangle */
    380     border-left: 5px solid #ccc;
    381     border-bottom: 5px solid transparent;
    382 }
    383 #wpadminbar a:hover .ab-comments-arrow {
     378    border-left: 4px solid #999;
     379    border-bottom: 4px solid transparent;
     380}
     381#wpadminbar a:hover .ab-comments-icon-arrow {
    384382    border-left-color: #bbb;
    385383}
  • trunk/wp-includes/script-loader.php

    r18695 r18696  
    424424    $styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' );
    425425    $styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
    426     $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20110916' );
     426    $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20110916b' );
    427427    $styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array(), '20101224' );
    428428    $styles->add( 'editor-buttons', "/wp-includes/css/editor-buttons$suffix.css", array(), '20110802' );
Note: See TracChangeset for help on using the changeset viewer.