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:
Daryl Koopersmith
2011-12-01 02:53:44 +00:00
parent 0cd6ddb43d
commit c47ea8d881
5 changed files with 66 additions and 52 deletions

View File

@@ -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'],
),
) );
}
/**