Make WordPress Core


Ignore:
Timestamp:
11/11/2010 08:02:52 PM (16 years ago)
Author:
ryan
Message:

Admin bar fixes. Props ocean90. see #14772

File:
1 edited

Legend:

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

    r16309 r16310  
    111111        global $wpdb, $wp_admin_bar;
    112112
    113         /* Add the 'My Dashboards' menu if the user has more than one site. */
     113        /* Add the 'My Sites' menu if the user has more than one site. */
    114114        if ( count( $wp_admin_bar->user->blogs ) <= 1 )
    115115                return;
    … …  
    125125
    126126                $marker = '';
    127                 if ( strlen($blog->blogname) > 35 )
     127                if ( strlen($blog->blogname) > 15 )
    128128                        $marker = '...';
    129129
    … …  
    131131                        $blogname = $blog->domain;
    132132                else
    133                         $blogname = substr( $blog->blogname, 0, 35 ) . $marker;
     133                        $blogname = substr( $blog->blogname, 0, 15 ) . $marker;
    134134
    135135                if ( ! isset( $blog->visible ) || $blog->visible === true ) {
    … …  
    221221        $awaiting_mod = $awaiting_mod->moderated;
    222222
    223         // @todo styling for awaiting mod count. Don't show count if zero?
    224         $wp_admin_bar->add_menu( array( 'id' => 'comments', 'title' => sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='pending-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'href' => admin_url('edit-comments.php') ) );
     223        $wp_admin_bar->add_menu( array( 'id' => 'comments', 'title' => sprintf( __('Comments %s'), "<span id='ab-awaiting-mod' class='count-$awaiting_mod'><span class='pending-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'href' => admin_url('edit-comments.php') ) );
    225224}
    226225
    … …  
    228227        global $wp_admin_bar;
    229228
    230         if ( !current_user_can('switch themes') )
     229        if ( !current_user_can('switch_themes') )
    231230                return;
    232231
    … …  
    277276        $update_title = !empty($update_title) ? esc_attr(implode(', ', $update_title)) : '';
    278277
    279         $update_title = sprintf( __('Updates %s'), "<span class='update-plugins count-$update_count' title='$update_title'><span class='update-count'>" . number_format_i18n($update_count) . "</span></span>" );
    280 
    281         // @todo styling for awaiting mod count. Don't show count if zero?
     278        $update_title = sprintf( __('Updates %s'), "<span id='ab-updates' class='count-$update_count' title='$update_title'><span class='update-count'>" . number_format_i18n($update_count) . "</span></span>" );
     279
    282280        $wp_admin_bar->add_menu( array( 'id' => 'updates', 'title' => $update_title, 'href' => admin_url('update-core.php') ) );
    283281}
Note: See TracChangeset for help on using the changeset viewer.