Update icons in toolbar: WP logo, comments, update, add new. props empireoflight, JohnONolan, fixes #19404.
git-svn-id: https://develop.svn.wordpress.org/trunk@19516 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0cd6ddb43d
commit
c47ea8d881
@ -74,7 +74,7 @@ add_action( 'admin_footer', 'wp_admin_bar_render', 1000 );
|
||||
function wp_admin_bar_wp_menu( $wp_admin_bar ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'id' => 'wp-logo',
|
||||
'title' => '<div class="ab-icon"></div>',
|
||||
'title' => '<span class="ab-icon"></span>',
|
||||
'href' => admin_url( 'about.php' ),
|
||||
) );
|
||||
|
||||
@ -486,10 +486,15 @@ function wp_admin_bar_new_content_menu( $wp_admin_bar ) {
|
||||
if ( ! $actions )
|
||||
return;
|
||||
|
||||
$title = '<span class="ab-icon"></span><span class="ab-label">' . _x( 'New', 'admin bar menu group label' ) . '</span>';
|
||||
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'id' => 'new-content',
|
||||
'title' => _x( 'Add New', 'admin bar menu group label' ),
|
||||
'title' => $title,
|
||||
'href' => admin_url( current( array_keys( $actions ) ) ),
|
||||
'meta' => array(
|
||||
'title' => _x( 'Add New', 'admin bar menu group label' ),
|
||||
),
|
||||
) );
|
||||
|
||||
foreach ( $actions as $link => $action ) {
|
||||
@ -518,12 +523,8 @@ function wp_admin_bar_comments_menu( $wp_admin_bar ) {
|
||||
$awaiting_mod = $awaiting_mod->moderated;
|
||||
$awaiting_title = esc_attr( sprintf( _n( '%s comment awaiting moderation', '%s comments awaiting moderation', $awaiting_mod ), number_format_i18n( $awaiting_mod ) ) );
|
||||
|
||||
$icon = '<div class="ab-icon">';
|
||||
$icon .= '<div class="ab-comments-icon-body"></div>';
|
||||
$icon .= '<div class="ab-comments-icon-arrow"></div>';
|
||||
$icon .= '</div>';
|
||||
|
||||
$title = '<span id="ab-awaiting-mod" class="awaiting-mod pending-count count-' . $awaiting_mod . '">' . number_format_i18n( $awaiting_mod ) . '</span>';
|
||||
$icon = '<span class="ab-icon"></span>';
|
||||
$title = '<span id="ab-awaiting-mod" class="ab-label awaiting-mod pending-count count-' . $awaiting_mod . '">' . number_format_i18n( $awaiting_mod ) . '</span>';
|
||||
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'id' => 'comments',
|
||||
@ -572,11 +573,16 @@ function wp_admin_bar_updates_menu( $wp_admin_bar ) {
|
||||
if ( !$update_data['counts']['total'] )
|
||||
return;
|
||||
|
||||
$update_title = "<span title='{$update_data['title']}'>";
|
||||
$update_title .= sprintf( __('Updates %s'), "<span id='ab-updates' class='update-count'>" . number_format_i18n($update_data['counts']['total']) . '</span>' );
|
||||
$update_title .= '</span>';
|
||||
$title = '<span class="ab-icon"></span><span class="ab-label">' . number_format_i18n( $update_data['counts']['total'] ) . '</span>';
|
||||
|
||||
$wp_admin_bar->add_menu( array( 'id' => 'updates', 'title' => $update_title, 'href' => network_admin_url( 'update-core.php' ) ) );
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'id' => 'updates',
|
||||
'title' => $title,
|
||||
'href' => network_admin_url( 'update-core.php' ),
|
||||
'meta' => array(
|
||||
'title' => $update_data['title'],
|
||||
),
|
||||
) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
File diff suppressed because one or more lines are too long
@ -212,6 +212,15 @@
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
#wpadminbar .hover .ab-label {
|
||||
color: #fafafa;
|
||||
}
|
||||
|
||||
#wpadminbar .menupop.hover .ab-label {
|
||||
color: #333;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
#wpadminbar .menupop li:hover,
|
||||
#wpadminbar .menupop li.hover,
|
||||
#wpadminbar .quicklinks .menupop .ab-item:focus,
|
||||
@ -233,14 +242,14 @@
|
||||
|
||||
#wpadminbar .menupop .menupop > .ab-item {
|
||||
display: block;
|
||||
background-image: url(../images/admin-bar-sprite.png?d=20111122);
|
||||
background-image: url(../images/admin-bar-sprite.png?d=20111130);
|
||||
background-position: 95% -20px;
|
||||
background-repeat: no-repeat;
|
||||
padding-right: 2em;
|
||||
}
|
||||
|
||||
#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item {
|
||||
background-image: url(../images/admin-bar-sprite.png?d=20111122);
|
||||
background-image: url(../images/admin-bar-sprite.png?d=20111130);
|
||||
background-position: 5% -46px;
|
||||
background-repeat: no-repeat;
|
||||
padding-left: 2em;
|
||||
@ -412,8 +421,8 @@
|
||||
color: #ccc;
|
||||
text-shadow: #444 0px -1px 0px;
|
||||
background-color: rgba( 255, 255, 255, 0 );
|
||||
background-image: url(../images/admin-bar-sprite.png?d=20111122);
|
||||
background-position: 3px 1px;
|
||||
background-image: url(../images/admin-bar-sprite.png?d=20111130);
|
||||
background-position: 3px 2px;
|
||||
background-repeat: no-repeat;
|
||||
outline: none;
|
||||
|
||||
@ -480,61 +489,60 @@
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
#wpadminbar .ab-label {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
/**
|
||||
* WP Logo icon
|
||||
*/
|
||||
#wp-admin-bar-wp-logo > .ab-item .ab-icon {
|
||||
background-image: url(../images/admin-bar-sprite.png?d=20111122);
|
||||
background-position: -2px -78px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-top: 4px;
|
||||
background-image: url(../images/admin-bar-sprite.png?d=20111130);
|
||||
background-position: 0 -76px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
#wpadminbar.nojs #wp-admin-bar-wp-logo:hover > .ab-item .ab-icon,
|
||||
#wpadminbar #wp-admin-bar-wp-logo.hover > .ab-item .ab-icon {
|
||||
background-image: url(../images/admin-bar-sprite.png?d=20111122);
|
||||
background-position: -2px -106px;
|
||||
background-image: url(../images/admin-bar-sprite.png?d=20111130);
|
||||
background-position: 0 -104px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates icon
|
||||
*/
|
||||
#wp-admin-bar-updates > .ab-item .ab-icon {
|
||||
background-image: url(../images/admin-bar-sprite.png?d=20111130);
|
||||
background-position: -2px -159px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
/**
|
||||
* Comments icon
|
||||
*/
|
||||
#wpadminbar .ab-comments-icon-body {
|
||||
background: #999;
|
||||
margin-top: 2px;
|
||||
height: 10px;
|
||||
width: 14px;
|
||||
-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: 1px;
|
||||
left: 3px;
|
||||
/* Use transparent borders to form a triangle */
|
||||
border-left: 4px solid #999;
|
||||
border-bottom: 4px solid transparent;
|
||||
}
|
||||
|
||||
#wpadminbar a:hover .ab-comments-icon-arrow {
|
||||
border-left-color: #bbb;
|
||||
}
|
||||
|
||||
#wpadminbar #ab-awaiting-mod {
|
||||
margin-left: 4px;
|
||||
#wp-admin-bar-comments > .ab-item .ab-icon {
|
||||
background-image: url(../images/admin-bar-sprite.png?d=20111130);
|
||||
background-position: -1px -134px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
#wpadminbar span.count-0 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add New icon
|
||||
*/
|
||||
#wp-admin-bar-new-content > .ab-item .ab-icon {
|
||||
background-image: url(../images/admin-bar-sprite.png?d=20111130);
|
||||
background-position: -2px -182px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* IE 6-targeted rules
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 3.8 KiB |
@ -454,7 +454,7 @@ function wp_default_styles( &$styles ) {
|
||||
$styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.3u1' );
|
||||
$styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' );
|
||||
$styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
|
||||
$styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20111130' );
|
||||
$styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20111130a' );
|
||||
$styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array(), '20111107' );
|
||||
$styles->add( 'editor-buttons', "/wp-includes/css/editor-buttons$suffix.css", array(), '20111114' );
|
||||
$styles->add( 'wp-pointer', "/wp-includes/css/wp-pointer$suffix.css", array(), '20111123a' );
|
||||
|
Loading…
Reference in New Issue
Block a user