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 ) {
|
function wp_admin_bar_wp_menu( $wp_admin_bar ) {
|
||||||
$wp_admin_bar->add_menu( array(
|
$wp_admin_bar->add_menu( array(
|
||||||
'id' => 'wp-logo',
|
'id' => 'wp-logo',
|
||||||
'title' => '<div class="ab-icon"></div>',
|
'title' => '<span class="ab-icon"></span>',
|
||||||
'href' => admin_url( 'about.php' ),
|
'href' => admin_url( 'about.php' ),
|
||||||
) );
|
) );
|
||||||
|
|
||||||
|
@ -486,10 +486,15 @@ function wp_admin_bar_new_content_menu( $wp_admin_bar ) {
|
||||||
if ( ! $actions )
|
if ( ! $actions )
|
||||||
return;
|
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(
|
$wp_admin_bar->add_menu( array(
|
||||||
'id' => 'new-content',
|
'id' => 'new-content',
|
||||||
'title' => _x( 'Add New', 'admin bar menu group label' ),
|
'title' => $title,
|
||||||
'href' => admin_url( current( array_keys( $actions ) ) ),
|
'href' => admin_url( current( array_keys( $actions ) ) ),
|
||||||
|
'meta' => array(
|
||||||
|
'title' => _x( 'Add New', 'admin bar menu group label' ),
|
||||||
|
),
|
||||||
) );
|
) );
|
||||||
|
|
||||||
foreach ( $actions as $link => $action ) {
|
foreach ( $actions as $link => $action ) {
|
||||||
|
@ -518,12 +523,8 @@ function wp_admin_bar_comments_menu( $wp_admin_bar ) {
|
||||||
$awaiting_mod = $awaiting_mod->moderated;
|
$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 ) ) );
|
$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 = '<span class="ab-icon"></span>';
|
||||||
$icon .= '<div class="ab-comments-icon-body"></div>';
|
$title = '<span id="ab-awaiting-mod" class="ab-label awaiting-mod pending-count count-' . $awaiting_mod . '">' . number_format_i18n( $awaiting_mod ) . '</span>';
|
||||||
$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>';
|
|
||||||
|
|
||||||
$wp_admin_bar->add_menu( array(
|
$wp_admin_bar->add_menu( array(
|
||||||
'id' => 'comments',
|
'id' => 'comments',
|
||||||
|
@ -572,11 +573,16 @@ function wp_admin_bar_updates_menu( $wp_admin_bar ) {
|
||||||
if ( !$update_data['counts']['total'] )
|
if ( !$update_data['counts']['total'] )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$update_title = "<span title='{$update_data['title']}'>";
|
$title = '<span class="ab-icon"></span><span class="ab-label">' . number_format_i18n( $update_data['counts']['total'] ) . '</span>';
|
||||||
$update_title .= sprintf( __('Updates %s'), "<span id='ab-updates' class='update-count'>" . number_format_i18n($update_data['counts']['total']) . '</span>' );
|
|
||||||
$update_title .= '</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;
|
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 .menupop li.hover,
|
#wpadminbar .menupop li.hover,
|
||||||
#wpadminbar .quicklinks .menupop .ab-item:focus,
|
#wpadminbar .quicklinks .menupop .ab-item:focus,
|
||||||
|
@ -233,14 +242,14 @@
|
||||||
|
|
||||||
#wpadminbar .menupop .menupop > .ab-item {
|
#wpadminbar .menupop .menupop > .ab-item {
|
||||||
display: block;
|
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-position: 95% -20px;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
padding-right: 2em;
|
padding-right: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item {
|
#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-position: 5% -46px;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
padding-left: 2em;
|
padding-left: 2em;
|
||||||
|
@ -412,8 +421,8 @@
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
text-shadow: #444 0px -1px 0px;
|
text-shadow: #444 0px -1px 0px;
|
||||||
background-color: rgba( 255, 255, 255, 0 );
|
background-color: rgba( 255, 255, 255, 0 );
|
||||||
background-image: url(../images/admin-bar-sprite.png?d=20111122);
|
background-image: url(../images/admin-bar-sprite.png?d=20111130);
|
||||||
background-position: 3px 1px;
|
background-position: 3px 2px;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|
||||||
|
@ -480,61 +489,60 @@
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#wpadminbar .ab-label {
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WP Logo icon
|
* WP Logo icon
|
||||||
*/
|
*/
|
||||||
#wp-admin-bar-wp-logo > .ab-item .ab-icon {
|
#wp-admin-bar-wp-logo > .ab-item .ab-icon {
|
||||||
background-image: url(../images/admin-bar-sprite.png?d=20111122);
|
width: 20px;
|
||||||
background-position: -2px -78px;
|
height: 20px;
|
||||||
|
margin-top: 4px;
|
||||||
|
background-image: url(../images/admin-bar-sprite.png?d=20111130);
|
||||||
|
background-position: 0 -76px;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wpadminbar.nojs #wp-admin-bar-wp-logo:hover > .ab-item .ab-icon,
|
#wpadminbar.nojs #wp-admin-bar-wp-logo:hover > .ab-item .ab-icon,
|
||||||
#wpadminbar #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-image: url(../images/admin-bar-sprite.png?d=20111130);
|
||||||
background-position: -2px -106px;
|
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;
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Comments icon
|
* Comments icon
|
||||||
*/
|
*/
|
||||||
#wpadminbar .ab-comments-icon-body {
|
#wp-admin-bar-comments > .ab-item .ab-icon {
|
||||||
background: #999;
|
background-image: url(../images/admin-bar-sprite.png?d=20111130);
|
||||||
margin-top: 2px;
|
background-position: -1px -134px;
|
||||||
height: 10px;
|
background-repeat: no-repeat;
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#wpadminbar span.count-0 {
|
#wpadminbar span.count-0 {
|
||||||
display: none;
|
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
|
* 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( '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( '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( '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( '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( 'editor-buttons', "/wp-includes/css/editor-buttons$suffix.css", array(), '20111114' );
|
||||||
$styles->add( 'wp-pointer', "/wp-includes/css/wp-pointer$suffix.css", array(), '20111123a' );
|
$styles->add( 'wp-pointer', "/wp-includes/css/wp-pointer$suffix.css", array(), '20111123a' );
|
||||||
|
|
Loading…
Reference in New Issue