Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/15/2010 04:43:07 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Use is_super_admin instead of deprecated is_site_admin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-messages.php

    r3186 r3192  
    9090    global $bp;
    9191
    92     if ( !is_site_admin() )
     92    if ( !is_super_admin() )
    9393        return false;
    9494
     
    117117    bp_core_new_subnav_item( array( 'name' => __( 'Compose', 'buddypress' ), 'slug' => 'compose', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_compose', 'position' => 30, 'user_has_access' => bp_is_my_profile() ) );
    118118
    119     if ( is_site_admin() )
    120         bp_core_new_subnav_item( array( 'name' => __( 'Notices', 'buddypress' ), 'slug' => 'notices', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_notices', 'position' => 90, 'user_has_access' => is_site_admin() ) );
     119    if ( is_super_admin() )
     120        bp_core_new_subnav_item( array( 'name' => __( 'Notices', 'buddypress' ), 'slug' => 'notices', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_notices', 'position' => 90, 'user_has_access' => is_super_admin() ) );
    121121
    122122    if ( $bp->current_component == $bp->messages->slug ) {
     
    201201    global $bp, $notice_id;
    202202
    203     if ( !is_site_admin() )
     203    if ( !is_super_admin() )
    204204        return false;
    205205
     
    286286    $thread_id = $bp->action_variables[0];
    287287
    288     if ( !$thread_id || !messages_is_valid_thread( $thread_id ) || ( !messages_check_thread_access($thread_id) && !is_site_admin() ) )
     288    if ( !$thread_id || !messages_is_valid_thread( $thread_id ) || ( !messages_check_thread_access($thread_id) && !is_super_admin() ) )
    289289        bp_core_redirect( $bp->displayed_user->domain . $bp->current_component );
    290290
     
    488488
    489489function messages_send_notice( $subject, $message ) {
    490     if ( !is_site_admin() || empty( $subject ) || empty( $message ) ) {
     490    if ( !is_super_admin() || empty( $subject ) || empty( $message ) ) {
    491491        return false;
    492492    } else {
Note: See TracChangeset for help on using the changeset viewer.