Changeset 3192
- Timestamp:
- 08/15/2010 04:43:07 AM (14 years ago)
- Location:
- branches/1.2
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-activity.php
r3186 r3192 174 174 return false; 175 175 176 if ( !is_s ite_admin() )176 if ( !is_super_admin() ) 177 177 $bp->is_item_admin = false; 178 178 … … 187 187 return false; 188 188 189 if ( !is_s ite_admin() )189 if ( !is_super_admin() ) 190 190 $bp->is_item_admin = false; 191 191 … … 197 197 global $bp; 198 198 199 if ( !is_s ite_admin() )199 if ( !is_super_admin() ) 200 200 $bp->is_item_admin = false; 201 201 … … 207 207 global $bp; 208 208 209 if ( !is_s ite_admin() )209 if ( !is_super_admin() ) 210 210 $bp->is_item_admin = false; 211 211 … … 356 356 357 357 /* Check access */ 358 if ( !is_s ite_admin() && $activity->user_id != $bp->loggedin_user->id )358 if ( !is_super_admin() && $activity->user_id != $bp->loggedin_user->id ) 359 359 return false; 360 360 -
branches/1.2/bp-activity/bp-activity-templatetags.php
r3174 r3192 576 576 577 577 /* Add the delete link if the user has permission on this item */ 578 if ( ( is_user_logged_in() && $activities_template->activity->user_id == $bp->loggedin_user->id ) || $bp->is_item_admin || $bp->loggedin_user->is_s ite_admin )578 if ( ( is_user_logged_in() && $activities_template->activity->user_id == $bp->loggedin_user->id ) || $bp->is_item_admin || $bp->loggedin_user->is_super_admin ) 579 579 $content .= apply_filters( 'bp_activity_delete_link', ' · ' . bp_get_activity_delete_link(), &$activities_template->activity ); 580 580 … … 660 660 661 661 /* Delete link */ 662 if ( $bp->loggedin_user->is_s ite_admin || $bp->loggedin_user->id == $comment->user_id )662 if ( $bp->loggedin_user->is_super_admin || $bp->loggedin_user->id == $comment->user_id ) 663 663 $content .= ' · <a href="' . wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug . '/delete/?cid=' . $comment->id, 'bp_activity_delete_link' ) . '" class="delete acomment-delete">' . __( 'Delete', 'buddypress' ) . '</a>'; 664 664 -
branches/1.2/bp-blogs.php
r3186 r3192 55 55 56 56 /* Only create the bp-blogs tables if this is a multisite install */ 57 if ( is_s ite_admin() && bp_core_is_multisite() ) {57 if ( is_super_admin() && bp_core_is_multisite() ) { 58 58 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 59 59 if ( get_site_option( 'bp-blogs-db-version' ) < BP_BLOGS_DB_VERSION ) -
branches/1.2/bp-blogs/bp-blogs-classes.php
r3139 r3192 76 76 bp_blogs_setup_globals(); 77 77 78 if ( !is_user_logged_in() || ( !is_s ite_admin() && ( $user_id != $bp->loggedin_user->id ) ) )78 if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) ) 79 79 $hidden_sql = "AND wb.public = 1"; 80 80 … … 210 210 211 211 // If the user is logged in return the blog count including their hidden blogs. 212 if ( ( is_user_logged_in() && $user_id == $bp->loggedin_user->id ) || is_s ite_admin() )212 if ( ( is_user_logged_in() && $user_id == $bp->loggedin_user->id ) || is_super_admin() ) 213 213 return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(DISTINCT b.blog_id) FROM {$bp->blogs->table_name} b LEFT JOIN {$wpdb->base_prefix}blogs wb ON b.blog_id = wb.blog_id WHERE wb.deleted = 0 AND wb.spam = 0 AND wb.mature = 0 AND wb.archived = '0' AND user_id = %d", $user_id) ); 214 214 else … … 224 224 $filter = like_escape( $wpdb->escape( $filter ) ); 225 225 226 if ( !is_s ite_admin() )226 if ( !is_super_admin() ) 227 227 $hidden_sql = "AND wb.public = 1"; 228 228 … … 242 242 bp_blogs_setup_globals(); 243 243 244 if ( !is_s ite_admin() )244 if ( !is_super_admin() ) 245 245 $hidden_sql = "AND wb.public = 1"; 246 246 … … 262 262 $letter = like_escape( $wpdb->escape( $letter ) ); 263 263 264 if ( !is_s ite_admin() )264 if ( !is_super_admin() ) 265 265 $hidden_sql = "AND wb.public = 1"; 266 266 -
branches/1.2/bp-core.php
r3186 r3192 107 107 $bp->loggedin_user->userdata = bp_core_get_core_userdata( $bp->loggedin_user->id ); 108 108 109 /* is_s ite_admin() hits the DB on single WP installs, so we need to get this separately so we can call it in a loop. */110 $bp->loggedin_user->is_s ite_admin = is_site_admin();109 /* is_super_admin() hits the DB on single WP installs, so we need to get this separately so we can call it in a loop. */ 110 $bp->loggedin_user->is_super_admin = is_super_admin(); 111 111 112 112 /* The user id of the user currently being viewed, set in /bp-core/bp-core-catchuri.php */ … … 269 269 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals() 270 270 * @global $current_user WordPress global variable containing current logged in user information 271 * @uses is_s ite_admin() returns true if the current user is a site admin, false if not271 * @uses is_super_admin() returns true if the current user is a site admin, false if not 272 272 * @uses get_site_option() fetches the value for a meta_key in the wp_sitemeta table 273 273 * @uses bp_core_install() runs the installation of DB tables for the core component … … 276 276 global $bp; 277 277 278 if ( !is_s ite_admin() )278 if ( !is_super_admin() ) 279 279 return false; 280 280 … … 294 294 * @package BuddyPress Core 295 295 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals() 296 * @uses is_s ite_admin() returns true if the current user is a site admin, false if not296 * @uses is_super_admin() returns true if the current user is a site admin, false if not 297 297 * @uses add_submenu_page() WP function to add a submenu item 298 298 */ 299 299 function bp_core_add_admin_menu() { 300 if ( !is_s ite_admin() )300 if ( !is_super_admin() ) 301 301 return false; 302 302 … … 431 431 global $bp, $wpdb, $wp_version; 432 432 433 if ( !is_s ite_admin() || bp_is_my_profile() || !$bp->displayed_user->id )433 if ( !is_super_admin() || bp_is_my_profile() || !$bp->displayed_user->id ) 434 434 return false; 435 435 … … 499 499 global $bp; 500 500 501 if ( !is_s ite_admin() || bp_is_my_profile() || !$bp->displayed_user->id )501 if ( !is_super_admin() || bp_is_my_profile() || !$bp->displayed_user->id ) 502 502 return false; 503 503 … … 681 681 682 682 /* If this is for site admins only and the user is not one, don't create the subnav item */ 683 if ( $site_admin_only && !is_s ite_admin() )683 if ( $site_admin_only && !is_super_admin() ) 684 684 return false; 685 685 … … 818 818 819 819 /* If this is for site admins only and the user is not one, don't create the subnav item */ 820 if ( $site_admin_only && !is_s ite_admin() )820 if ( $site_admin_only && !is_super_admin() ) 821 821 return false; 822 822 … … 1715 1715 * @package BuddyPress Core 1716 1716 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals() 1717 * @uses is_s ite_admin() Checks to see if the user is a site administrator.1717 * @uses is_super_admin() Checks to see if the user is a site administrator. 1718 1718 * @uses wpmu_delete_user() Deletes a user from the system on multisite installs. 1719 1719 * @uses wp_delete_user() Deletes a user from the system on singlesite installs. … … 1731 1731 1732 1732 /* Site admins cannot be deleted */ 1733 if ( is_s ite_admin( bp_core_get_username( $user_id ) ) )1733 if ( is_super_admin( bp_core_get_username( $user_id ) ) ) 1734 1734 return false; 1735 1735 … … 2005 2005 return false; 2006 2006 2007 if ( !is_s ite_admin() )2007 if ( !is_super_admin() ) 2008 2008 return false; 2009 2009 -
branches/1.2/bp-core/bp-core-catchuri.php
r3144 r3192 246 246 /* If this user has been marked as a spammer and the logged in user is not a site admin, redirect. */ 247 247 if ( isset( $bp->displayed_user->id ) && bp_core_is_user_spammer( $bp->displayed_user->id ) ) { 248 if ( !is_s ite_admin() )248 if ( !is_super_admin() ) 249 249 bp_core_redirect( $bp->root_domain ); 250 250 else -
branches/1.2/bp-core/bp-core-filters.php
r3144 r3192 44 44 global $bp, $current_blog; 45 45 46 if ( !is_s ite_admin() )46 if ( !is_super_admin() ) 47 47 return $themes; 48 48 -
branches/1.2/bp-core/bp-core-settings.php
r3146 r3192 22 22 bp_core_new_subnav_item( array( 'name' => __( 'Notifications', 'buddypress' ), 'slug' => 'notifications', 'parent_url' => $settings_link, 'parent_slug' => $bp->settings->slug, 'screen_function' => 'bp_core_screen_notification_settings', 'position' => 20, 'user_has_access' => bp_is_my_profile() ) ); 23 23 24 if ( !is_s ite_admin() && !(int) $bp->site_options['bp-disable-account-deletion'] )24 if ( !is_super_admin() && !(int) $bp->site_options['bp-disable-account-deletion'] ) 25 25 bp_core_new_subnav_item( array( 'name' => __( 'Delete Account', 'buddypress' ), 'slug' => 'delete-account', 'parent_url' => $settings_link, 'parent_slug' => $bp->settings->slug, 'screen_function' => 'bp_core_screen_delete_account', 'position' => 90, 'user_has_access' => bp_is_my_profile() ) ); 26 26 } -
branches/1.2/bp-core/bp-core-templatetags.php
r3160 r3192 1358 1358 global $bp; 1359 1359 1360 if ( is_s ite_admin() || is_user_logged_in() && $bp->loggedin_user->id == $bp->displayed_user->id )1360 if ( is_super_admin() || is_user_logged_in() && $bp->loggedin_user->id == $bp->displayed_user->id ) 1361 1361 $has_access = true; 1362 1362 else -
branches/1.2/bp-core/bp-core-wpabstraction.php
r3161 r3192 91 91 } 92 92 93 if ( !function_exists( 'is_s ite_admin' ) ) {94 function is_s ite_admin( $user_id = false ) {93 if ( !function_exists( 'is_super_admin' ) ) { 94 function is_super_admin( $user_id = false ) { 95 95 if ( current_user_can( 'manage_options' ) ) 96 96 return true; -
branches/1.2/bp-forums.php
r3145 r3192 69 69 if ( $bp->groups->current_group = groups_get_group( array( 'group_id' => $_POST['topic_group_id'] ) ) ) { 70 70 /* Auto join this user if they are not yet a member of this group */ 71 if ( !is_s ite_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )71 if ( !is_super_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) ) 72 72 groups_join_group( $bp->groups->current_group->id, $bp->groups->current_group->id ); 73 73 … … 95 95 global $bp; 96 96 97 if ( !is_s ite_admin() )97 if ( !is_super_admin() ) 98 98 return false; 99 99 -
branches/1.2/bp-forums/bp-forums-templatetags.php
r3143 r3192 557 557 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'edit', 'bp_forums_edit_topic' ) . '">' . __( 'Edit Topic', 'buddypress' ) . '</a>'; 558 558 559 if ( $bp->is_item_admin || $bp->is_item_mod || is_s ite_admin() ) {559 if ( $bp->is_item_admin || $bp->is_item_mod || is_super_admin() ) { 560 560 if ( 0 == (int)$forum_template->topic->topic_sticky ) 561 561 $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'stick', 'bp_forums_stick_topic' ) . '">' . __( 'Sticky Topic', 'buddypress' ) . '</a>'; -
branches/1.2/bp-friends.php
r3186 r3192 55 55 global $bp; 56 56 57 if ( !is_s ite_admin() )57 if ( !is_super_admin() ) 58 58 return false; 59 59 -
branches/1.2/bp-groups.php
r3186 r3192 129 129 130 130 /* Using "item" not "group" for generic support in other components. */ 131 if ( is_s ite_admin() )131 if ( is_super_admin() ) 132 132 $bp->is_item_admin = 1; 133 133 else … … 184 184 // If this is a private or hidden group, does the user have access? 185 185 if ( 'private' == $bp->groups->current_group->status || 'hidden' == $bp->groups->current_group->status ) { 186 if ( $bp->groups->current_group->is_user_member && is_user_logged_in() || is_s ite_admin() )186 if ( $bp->groups->current_group->is_user_member && is_user_logged_in() || is_super_admin() ) 187 187 $bp->groups->current_group->user_has_access = true; 188 188 else … … 206 206 207 207 // If this is a private group, and the user is not a member, show a "Request Membership" nav item. 208 if ( !is_s ite_admin() && is_user_logged_in() && !$bp->groups->current_group->is_user_member && !groups_check_for_membership_request( $bp->loggedin_user->id, $bp->groups->current_group->id ) && $bp->groups->current_group->status == 'private' )208 if ( !is_super_admin() && is_user_logged_in() && !$bp->groups->current_group->is_user_member && !groups_check_for_membership_request( $bp->loggedin_user->id, $bp->groups->current_group->id ) && $bp->groups->current_group->status == 'private' ) 209 209 bp_core_new_subnav_item( array( 'name' => __( 'Request Membership', 'buddypress' ), 'slug' => 'request-membership', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->slug, 'screen_function' => 'groups_screen_group_request_membership', 'position' => 30 ) ); 210 210 … … 244 244 245 245 /* Don't show this menu to non site admins or if you're viewing your own profile */ 246 if ( !is_s ite_admin() )246 if ( !is_super_admin() ) 247 247 return false; 248 248 ?> … … 370 370 371 371 /* Auto join this user if they are not yet a member of this group */ 372 if ( $bp->groups->auto_join && !is_s ite_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )372 if ( $bp->groups->auto_join && !is_super_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) ) 373 373 groups_join_group( $bp->groups->current_group->id, $bp->loggedin_user->id ); 374 374 … … 548 548 549 549 /* Auto join this user if they are not yet a member of this group */ 550 if ( $bp->groups->auto_join && !is_s ite_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )550 if ( $bp->groups->auto_join && !is_super_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) ) 551 551 groups_join_group( $bp->groups->current_group->id, $bp->loggedin_user->id ); 552 552 … … 935 935 if ( $bp->current_component == $bp->groups->slug && 'delete-group' == $bp->action_variables[0] ) { 936 936 937 if ( !$bp->is_item_admin && !is_s ite_admin() )937 if ( !$bp->is_item_admin && !is_super_admin() ) 938 938 return false; 939 939 … … 1915 1915 1916 1916 /* Be sure the user is a member of the group before posting. */ 1917 if ( !is_s ite_admin() && !groups_is_user_member( $user_id, $group_id ) )1917 if ( !is_super_admin() && !groups_is_user_member( $user_id, $group_id ) ) 1918 1918 return false; 1919 1919 -
branches/1.2/bp-groups/bp-groups-classes.php
r3181 r3192 205 205 } 206 206 207 if ( !is_s ite_admin() )207 if ( !is_super_admin() ) 208 208 $hidden_sql = "AND status != 'hidden'"; 209 209 … … 264 264 $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 265 265 266 if ( !is_user_logged_in() || ( !is_s ite_admin() && ( $user_id != $bp->loggedin_user->id ) ) )266 if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) ) 267 267 $hidden_sql = "AND g.status != 'hidden'"; 268 268 … … 296 296 $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 297 297 298 if ( !is_user_logged_in() || ( !is_s ite_admin() && ( $user_id != $bp->loggedin_user->id ) ) )298 if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) ) 299 299 $hidden_sql = "AND g.status != 'hidden'"; 300 300 … … 329 329 } 330 330 331 if ( !is_user_logged_in() || ( !is_s ite_admin() && ( $user_id != $bp->loggedin_user->id ) ) )331 if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) ) 332 332 $hidden_sql = "AND g.status != 'hidden'"; 333 333 … … 361 361 $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 362 362 363 if ( !is_user_logged_in() || ( !is_s ite_admin() && ( $user_id != $bp->loggedin_user->id ) ) )363 if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) ) 364 364 $hidden_sql = " AND g.status != 'hidden'"; 365 365 … … 397 397 } 398 398 399 if ( !is_user_logged_in() || ( !is_s ite_admin() && ( $user_id != $bp->loggedin_user->id ) ) )399 if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) ) 400 400 $hidden_sql = " AND g.status != 'hidden'"; 401 401 … … 433 433 } 434 434 435 if ( !is_user_logged_in() || ( !is_s ite_admin() && ( $user_id != $bp->loggedin_user->id ) ) )435 if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) ) 436 436 $hidden_sql = " AND g.status != 'hidden'"; 437 437 … … 470 470 $where_conditions[] = $wpdb->prepare( "g.status = 'public'" ); 471 471 472 if ( !is_s ite_admin() )472 if ( !is_super_admin() ) 473 473 $where_conditions[] = $wpdb->prepare( "g.status != 'hidden'"); 474 474 … … 517 517 } 518 518 519 if ( !is_s ite_admin() )519 if ( !is_super_admin() ) 520 520 $hidden_sql = $wpdb->prepare( " AND status != 'hidden'"); 521 521 … … 544 544 $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) ); 545 545 546 if ( !is_user_logged_in() || ( !is_s ite_admin() && ( $user_id != $bp->loggedin_user->id ) ) )546 if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) ) 547 547 $hidden_sql = "AND g.status != 'hidden'"; 548 548 … … 605 605 global $wpdb, $bp; 606 606 607 if ( !is_s ite_admin() )607 if ( !is_super_admin() ) 608 608 $hidden_sql = "WHERE status != 'hidden'"; 609 609 … … 881 881 $user_id = $bp->displayed_user->id; 882 882 883 if ( $user_id != $bp->loggedin_user->id && !is_s ite_admin() ) {883 if ( $user_id != $bp->loggedin_user->id && !is_super_admin() ) { 884 884 return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(DISTINCT m.group_id) FROM {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE m.group_id = g.id AND g.status != 'hidden' AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0", $user_id ) ); 885 885 } else { -
branches/1.2/bp-groups/bp-groups-filters.php
r2765 r3192 93 93 global $bp; 94 94 95 if ( is_s ite_admin() )95 if ( is_super_admin() ) 96 96 return true; 97 97 -
branches/1.2/bp-groups/bp-groups-templatetags.php
r3179 r3192 193 193 global $bp, $groups_template; 194 194 195 if ( $bp->loggedin_user->is_s ite_admin )195 if ( $bp->loggedin_user->is_super_admin ) 196 196 return true; 197 197 … … 968 968 * Checks if current user is member of a group. 969 969 * 970 * @uses is_s ite_admin Check if current user is super admin970 * @uses is_super_admin Check if current user is super admin 971 971 * @uses apply_filters Creates bp_group_is_member filter and passes $is_member 972 972 * @usedby groups/activity.php, groups/single/forum/edit.php, groups/single/forum/topic.php to determine template part visibility … … 980 980 981 981 // Site admins always have access 982 if ( is_s ite_admin() )982 if ( is_super_admin() ) 983 983 return true; 984 984 -
branches/1.2/bp-messages.php
r3186 r3192 90 90 global $bp; 91 91 92 if ( !is_s ite_admin() )92 if ( !is_super_admin() ) 93 93 return false; 94 94 … … 117 117 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() ) ); 118 118 119 if ( is_s ite_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_s ite_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() ) ); 121 121 122 122 if ( $bp->current_component == $bp->messages->slug ) { … … 201 201 global $bp, $notice_id; 202 202 203 if ( !is_s ite_admin() )203 if ( !is_super_admin() ) 204 204 return false; 205 205 … … 286 286 $thread_id = $bp->action_variables[0]; 287 287 288 if ( !$thread_id || !messages_is_valid_thread( $thread_id ) || ( !messages_check_thread_access($thread_id) && !is_s ite_admin() ) )288 if ( !$thread_id || !messages_is_valid_thread( $thread_id ) || ( !messages_check_thread_access($thread_id) && !is_super_admin() ) ) 289 289 bp_core_redirect( $bp->displayed_user->domain . $bp->current_component ); 290 290 … … 488 488 489 489 function messages_send_notice( $subject, $message ) { 490 if ( !is_s ite_admin() || empty( $subject ) || empty( $message ) ) {490 if ( !is_super_admin() || empty( $subject ) || empty( $message ) ) { 491 491 return false; 492 492 } else { -
branches/1.2/bp-messages/bp-messages-templatetags.php
r3156 r3192 158 158 extract( $r, EXTR_SKIP ); 159 159 160 if ( 'notices' == $bp->current_action && !is_s ite_admin() ) {160 if ( 'notices' == $bp->current_action && !is_super_admin() ) { 161 161 wp_redirect( $bp->displayed_user->id ); 162 162 } else { -
branches/1.2/bp-themes/bp-default/_inc/ajax.php
r3145 r3192 217 217 218 218 /* Check access */ 219 if ( !is_s ite_admin() && $activity->user_id != $bp->loggedin_user->id )219 if ( !is_super_admin() && $activity->user_id != $bp->loggedin_user->id ) 220 220 return false; 221 221 … … 250 250 251 251 /* Check access */ 252 if ( !is_s ite_admin() && $comment->user_id != $bp->loggedin_user->id )252 if ( !is_super_admin() && $comment->user_id != $bp->loggedin_user->id ) 253 253 return false; 254 254 -
branches/1.2/bp-themes/bp-default/functions.php
r3171 r3192 90 90 /* Hijack the saving of page on front setting to save the activity stream setting */ 91 91 function bp_dtheme_page_on_front_update( $oldvalue, $newvalue ) { 92 if ( !is_admin() || !is_s ite_admin() )92 if ( !is_admin() || !is_super_admin() ) 93 93 return false; 94 94 -
branches/1.2/bp-themes/bp-default/groups/create.php
r2767 r3192 53 53 </div> 54 54 <?php else : ?> 55 <?php if ( is_s ite_admin() ) : ?>55 <?php if ( is_super_admin() ) : ?> 56 56 <div class="checkbox"> 57 57 <label><input type="checkbox" disabled="disabled" name="disabled" id="disabled" value="0" /> <?php printf( __('<strong>Attention Site Admin:</strong> Group forums require the <a href="%s">correct setup and configuration</a> of a bbPress installation.', 'buddypress' ), bp_get_root_domain() . '/wp-admin/admin.php?page=bb-forums-setup' ) ?></label> -
branches/1.2/bp-themes/bp-default/members/single/messages/compose.php
r2191 r3192 11 11 </ul> 12 12 13 <?php if ( is_s ite_admin() ) : ?>13 <?php if ( is_super_admin() ) : ?> 14 14 <input type="checkbox" id="send-notice" name="send-notice" value="1" /> <?php _e( "This is a notice to all users.", "buddypress" ) ?> 15 15 <?php endif; ?> -
branches/1.2/bp-xprofile.php
r3186 r3192 132 132 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals() 133 133 * @global $wpdb WordPress DB access object. 134 * @uses is_s ite_admin() returns true if the current user is a site admin, false if not134 * @uses is_super_admin() returns true if the current user is a site admin, false if not 135 135 * @uses bp_xprofile_install() runs the installation of DB tables for the xprofile component 136 136 * @uses wp_enqueue_script() Adds a JS file to the JS queue ready for output … … 142 142 global $wpdb, $bp; 143 143 144 if ( !is_s ite_admin() )144 if ( !is_super_admin() ) 145 145 return false; 146 146 … … 207 207 208 208 /* Don't show this menu to non site admins or if you're viewing your own profile */ 209 if ( !is_s ite_admin() || bp_is_my_profile() )209 if ( !is_super_admin() || bp_is_my_profile() ) 210 210 return false; 211 211 ?> … … 268 268 global $bp; 269 269 270 if ( !bp_is_my_profile() && !is_s ite_admin() )270 if ( !bp_is_my_profile() && !is_super_admin() ) 271 271 return false; 272 272 … … 358 358 global $bp; 359 359 360 if ( !bp_is_my_profile() && !is_s ite_admin() )360 if ( !bp_is_my_profile() && !is_super_admin() ) 361 361 return false; 362 362 … … 427 427 check_admin_referer( 'bp_delete_avatar_link' ); 428 428 429 if ( !bp_is_my_profile() && !is_s ite_admin() )429 if ( !bp_is_my_profile() && !is_super_admin() ) 430 430 return false; 431 431
Note: See TracChangeset
for help on using the changeset viewer.