Changeset 16310 for trunk/wp-includes/admin-bar.php
- Timestamp:
- 11/11/2010 08:02:52 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/admin-bar.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/admin-bar.php
r16309 r16310 111 111 global $wpdb, $wp_admin_bar; 112 112 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. */ 114 114 if ( count( $wp_admin_bar->user->blogs ) <= 1 ) 115 115 return; … … 125 125 126 126 $marker = ''; 127 if ( strlen($blog->blogname) > 35 )127 if ( strlen($blog->blogname) > 15 ) 128 128 $marker = '...'; 129 129 … … 131 131 $blogname = $blog->domain; 132 132 else 133 $blogname = substr( $blog->blogname, 0, 35 ) . $marker;133 $blogname = substr( $blog->blogname, 0, 15 ) . $marker; 134 134 135 135 if ( ! isset( $blog->visible ) || $blog->visible === true ) { … … 221 221 $awaiting_mod = $awaiting_mod->moderated; 222 222 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') ) ); 225 224 } 226 225 … … 228 227 global $wp_admin_bar; 229 228 230 if ( !current_user_can('switch themes') )229 if ( !current_user_can('switch_themes') ) 231 230 return; 232 231 … … 277 276 $update_title = !empty($update_title) ? esc_attr(implode(', ', $update_title)) : ''; 278 277 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 282 280 $wp_admin_bar->add_menu( array( 'id' => 'updates', 'title' => $update_title, 'href' => admin_url('update-core.php') ) ); 283 281 }
Note: See TracChangeset
for help on using the changeset viewer.