Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/14/2011 05:19:12 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Find/replace on is_super_admin() to use bp_current_user_can( 'bp_moderate' ). See #3740.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-functions.php

    r5320 r5329  
    272272 *
    273273 * @package BuddyPress Core
    274  * @uses is_super_admin() returns true if the current user is a site admin, false if not
     274 * @uses bp_current_user_can() returns true if the current user is a site admin, false if not
    275275 */
    276276function bp_core_admin_menu_init() {
    277     if ( !is_super_admin() )
     277    if ( !bp_current_user_can( 'bp_moderate' ) )
    278278        return false;
    279279
     
    289289 * @package BuddyPress Core
    290290 * @global object $bp Global BuddyPress settings object
    291  * @uses is_super_admin() returns true if the current user is a site admin, false if not
     291 * @uses bp_current_user_can() returns true if the current user is a site admin, false if not
    292292 * @uses add_submenu_page() WP function to add a submenu item
    293293 */
    294294function bp_core_add_admin_menu() {
    295     if ( !is_super_admin() )
     295    if ( !bp_current_user_can( 'bp_moderate' ) )
    296296        return false;
    297297
     
    324324 *
    325325 * @global object $bp Global BuddyPress settings object
    326  * @uses is_super_admin() to check current user permissions before showing the notices
     326 * @uses bp_current_user_can() to check current user permissions before showing the notices
    327327 * @uses bp_is_root_blog()
    328328 */
     
    331331
    332332    // Only the super admin should see messages
    333     if ( !is_super_admin() )
     333    if ( !bp_current_user_can( 'bp_moderate' ) )
    334334        return;
    335335
     
    392392
    393393    // Only the super admin gets warnings
    394     if ( !is_super_admin() )
     394    if ( !bp_current_user_can( 'bp_moderate' ) )
    395395        return;
    396396
Note: See TracChangeset for help on using the changeset viewer.