WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/22/2011 04:19:05 PM (7 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

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

    r19390 r19398  
    260260
    261261        // Content related.
    262         add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 );
    263         add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 70 );
     262        if ( ! is_network_admin() && ! is_user_admin() ) {
     263            add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 );
     264            add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 70 );
     265        }
    264266        add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 80 );
    265267        add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 90 );
Note: See TracChangeset for help on using the changeset viewer.