Don't show Add New and Comments admin bar menus in network or user admins. Add tooltip to comments menu. Props ocean90. fixes #19327

git-svn-id: http://svn.automattic.com/wordpress/trunk@19398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-11-22 16:19:05 +00:00
parent ca3bdacd5e
commit 28152dfd20
2 changed files with 6 additions and 3 deletions

View File

@ -516,8 +516,9 @@ function wp_admin_bar_comments_menu( $wp_admin_bar ) {
$awaiting_mod = wp_count_comments();
$awaiting_mod = $awaiting_mod->moderated;
$awaiting_title = sprintf( _n( '%s comment awaiting moderation', '%s comments awaiting moderation', $awaiting_mod ), number_format_i18n( $awaiting_mod ) );
$icon = "<div class='ab-comments-icon'>";
$icon = "<div class='ab-comments-icon' title='$awaiting_title'>";
$icon .= "<div class='ab-comments-icon-body'></div>";
$icon .= "<div class='ab-comments-icon-arrow'></div>";
$icon .= "</div>";

View File

@ -259,8 +259,10 @@ class WP_Admin_Bar {
add_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 40 );
// Content related.
if ( ! is_network_admin() && ! is_user_admin() ) {
add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 );
add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 70 );
}
add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 80 );
add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 90 );