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:
parent
ca3bdacd5e
commit
28152dfd20
|
@ -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>";
|
||||
|
|
|
@ -259,8 +259,10 @@ class WP_Admin_Bar {
|
|||
add_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 40 );
|
||||
|
||||
// Content related.
|
||||
add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 );
|
||||
add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 70 );
|
||||
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 );
|
||||
|
||||
|
|
Loading…
Reference in New Issue