Changeset 5689
- Timestamp:
- 02/10/2012 01:17:51 AM (13 years ago)
- Location:
- trunk/bp-groups
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-actions.php
r5620 r5689 1 1 <?php 2 /******************************************************************************** 3 * Action Functions 2 3 /** 4 * BuddyPress Groups Activity & Notification Functions 4 5 * 5 6 * Action functions are exactly the same as screen functions, however they do not 6 7 * have a template screen associated with them. Usually they will send the user 7 8 * back to the default screen after execution. 9 * 10 * @package BuddyPress 11 * @subpackage GroupsActions 8 12 */ 9 13 … … 288 292 289 293 function groups_action_redirect_to_random_group() { 290 global $bp, $wpdb;291 294 292 295 if ( bp_is_groups_component() && isset( $_GET['random-group'] ) ) { … … 316 319 } 317 320 add_action( 'bp_actions', 'groups_action_group_feed' ); 321 318 322 ?> -
trunk/bp-groups/bp-groups-activity.php
r5431 r5689 1 1 <?php 2 2 3 /** 3 4 * BuddyPress Groups Activity & Notification Functions … … 63 64 global $bp; 64 65 65 if ( !$group_id)66 if ( empty( $group_id ) ) 66 67 $group_id = $bp->groups->current_group->id; 67 68 68 if ( !$group_id)69 if ( empty( $group_id ) ) 69 70 return false; 70 71 71 72 groups_update_groupmeta( $group_id, 'last_activity', bp_core_current_time() ); 72 73 } 73 add_action( 'groups_leave_group', 'groups_update_last_activity' );74 add_action( 'groups_created_group', 'groups_update_last_activity' );75 add_action( 'groups_new_forum_topic', 'groups_update_last_activity' );74 add_action( 'groups_leave_group', 'groups_update_last_activity' ); 75 add_action( 'groups_created_group', 'groups_update_last_activity' ); 76 add_action( 'groups_new_forum_topic', 'groups_update_last_activity' ); 76 77 add_action( 'groups_new_forum_topic_post', 'groups_update_last_activity' ); 77 78 78 79 function groups_format_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { 79 global $bp;80 80 81 81 switch ( $action ) { … … 305 305 return false; 306 306 } 307 307 308 ?> -
trunk/bp-groups/bp-groups-adminbar.php
r5519 r5689 1 1 <?php 2 2 3 /** 3 4 * BuddyPress Groups Admin Bar -
trunk/bp-groups/bp-groups-buddybar.php
r5687 r5689 1 1 <?php 2 3 /** 4 * BuddyPress Groups BuddyBar 5 * 6 * @package BuddyPress 7 * @subpackage GroupsBuddyBar 8 */ 9 2 10 // Exit if accessed directly 3 11 if ( !defined( 'ABSPATH' ) ) exit; 4 12 13 /** 14 * Adds menu items to the BuddyBar 15 * 16 * @since BuddyPress (1.0) 17 * @global BuddyPress $bp 18 * @return False if no menu 19 */ 5 20 function bp_groups_adminbar_admin_menu() { 6 21 global $bp; -
trunk/bp-groups/bp-groups-cache.php
r5460 r5689 1 1 <?php 2 2 3 /** 3 4 * BuddyPress Groups Caching -
trunk/bp-groups/bp-groups-classes.php
r5687 r5689 59 59 $admin_mods = $wpdb->get_results( apply_filters( 'bp_group_admin_mods_user_join_filter', $wpdb->prepare( "SELECT u.ID as user_id, u.user_login, u.user_email, u.user_nicename, m.is_admin, m.is_mod FROM {$wpdb->users} u, {$bp->groups->table_name_members} m WHERE u.ID = m.user_id AND m.group_id = %d AND ( m.is_admin = 1 OR m.is_mod = 1 )", $this->id ) ) ); 60 60 foreach( (array)$admin_mods as $user ) { 61 if ( (int) $user->is_admin )61 if ( (int) $user->is_admin ) 62 62 $this->admins[] = $user; 63 63 else … … 191 191 global $wpdb, $bp; 192 192 193 if ( !$user_id)193 if ( empty( $user_id ) ) 194 194 $user_id = bp_displayed_user_id(); 195 195 … … 796 796 797 797 function ban() { 798 global $bp;799 798 800 799 if ( $this->is_admin ) … … 808 807 $group_count = bp_get_user_meta( $this->user_id, 'total_group_count', true ); 809 808 if ( !empty( $group_count ) ) 810 bp_update_user_meta( $this->user_id, 'total_group_count', (int) $group_count - 1 );809 bp_update_user_meta( $this->user_id, 'total_group_count', (int) $group_count - 1 ); 811 810 812 811 return $this->save(); … … 814 813 815 814 function unban() { 816 global $bp;817 815 818 816 if ( $this->is_admin ) … … 822 820 823 821 groups_update_groupmeta( $this->group_id, 'total_member_count', ( (int) groups_get_groupmeta( $this->group_id, 'total_member_count' ) + 1 ) ); 824 bp_update_user_meta( $this->user_id, 'total_group_count', (int) bp_get_user_meta( $this->user_id, 'total_group_count', true ) + 1 );822 bp_update_user_meta( $this->user_id, 'total_group_count', (int) bp_get_user_meta( $this->user_id, 'total_group_count', true ) + 1 ); 825 823 826 824 return $this->save(); … … 828 826 829 827 function accept_invite() { 830 global $bp;831 828 832 829 $this->inviter_id = 0; … … 834 831 $this->date_modified = bp_core_current_time(); 835 832 836 bp_update_user_meta( $this->user_id, 'total_group_count', (int) bp_get_user_meta( $this->user_id, 'total_group_count', true ) + 1 );833 bp_update_user_meta( $this->user_id, 'total_group_count', (int) bp_get_user_meta( $this->user_id, 'total_group_count', true ) + 1 ); 837 834 } 838 835 839 836 function accept_request() { 840 global $bp;841 837 842 838 $this->is_confirmed = 1; 843 839 $this->date_modified = bp_core_current_time(); 844 840 845 bp_update_user_meta( $this->user_id, 'total_group_count', (int) bp_get_user_meta( $this->user_id, 'total_group_count', true ) + 1 );841 bp_update_user_meta( $this->user_id, 'total_group_count', (int) bp_get_user_meta( $this->user_id, 'total_group_count', true ) + 1 ); 846 842 } 847 843 … … 858 854 $group_count = bp_get_user_meta( $this->user_id, 'total_group_count', true ); 859 855 if ( !empty( $group_count ) ) 860 bp_update_user_meta( $this->user_id, 'total_group_count', (int) $group_count - 1 );856 bp_update_user_meta( $this->user_id, 'total_group_count', (int) $group_count - 1 ); 861 857 862 858 return $result; … … 961 957 global $bp, $wpdb; 962 958 963 if ( !$user_id)959 if ( empty( $user_id ) ) 964 960 $user_id = bp_displayed_user_id(); 965 961 … … 987 983 global $wpdb, $bp; 988 984 989 if ( !$user_id)985 if ( empty( $user_id ) ) 990 986 return false; 991 987 … … 1001 997 global $wpdb, $bp; 1002 998 1003 if ( !$user_id)999 if ( empty( $user_id ) ) 1004 1000 return false; 1005 1001 … … 1010 1006 global $wpdb, $bp; 1011 1007 1012 if ( !$user_id)1008 if ( empty( $user_id ) ) 1013 1009 return false; 1014 1010 … … 1019 1015 global $wpdb, $bp; 1020 1016 1021 if ( !$user_id)1017 if ( empty( $user_id ) ) 1022 1018 return false; 1023 1019 … … 1028 1024 global $wpdb, $bp; 1029 1025 1030 if ( !$user_id)1026 if ( empty( $user_id ) ) 1031 1027 return false; 1032 1028 … … 1037 1033 global $wpdb, $bp; 1038 1034 1039 if ( !$user_id)1035 if ( empty( $user_id ) ) 1040 1036 return false; 1041 1037 … … 1046 1042 global $wpdb, $bp; 1047 1043 1048 if ( !$user_id)1044 if ( empty( $user_id ) ) 1049 1045 return false; 1050 1046 … … 1064 1060 global $bp, $wpdb; 1065 1061 1066 if ( !$user_id)1062 if ( empty( $user_id ) ) 1067 1063 return false; 1068 1064 … … 1073 1069 global $wpdb, $bp; 1074 1070 1075 if ( !$user_id)1071 if ( empty( $user_id ) ) 1076 1072 return false; 1077 1073 … … 1336 1332 return false; 1337 1333 1338 /* Register the group extension on the bp_init action so we have access to all plugins */ 1334 // Register the group extension on the bp_init action so we have access 1335 // to all plugins. 1339 1336 add_action( 'bp_init', create_function( '', '$extension = new ' . $group_extension_class . '; add_action( "bp_actions", array( &$extension, "_register" ), 8 );' ), 11 ); 1340 1337 } -
trunk/bp-groups/bp-groups-filters.php
r5560 r5689 57 57 $groups_allowedtags['img']['id'] = array(); 58 58 $groups_allowedtags['code'] = array(); 59 $groups_allowedtags = apply_filters( 'bp_groups_filter_kses', $groups_allowedtags ); 59 60 60 $groups_allowedtags = apply_filters( 'bp_groups_filter_kses', $groups_allowedtags );61 61 return wp_kses( $content, $groups_allowedtags ); 62 62 } 63 63 64 /** ** Filters for group forums****/64 /** Group forums **************************************************************/ 65 65 66 /** 67 * Only filter the forum SQL on group pages or on the forums directory 68 */ 66 69 function groups_add_forum_privacy_sql() { 67 global $bp; 68 69 // Only filter the forum SQL on group pages or on the forums directory 70 add_filter( 'get_topics_fields', 'groups_add_forum_fields_sql' ); 71 add_filter( 'get_topics_join', 'groups_add_forum_tables_sql' ); 72 add_filter( 'get_topics_where', 'groups_add_forum_where_sql' ); 70 add_filter( 'get_topics_fields', 'groups_add_forum_fields_sql' ); 71 add_filter( 'get_topics_join', 'groups_add_forum_tables_sql' ); 72 add_filter( 'get_topics_where', 'groups_add_forum_where_sql' ); 73 73 } 74 74 add_filter( 'bbpress_init', 'groups_add_forum_privacy_sql' ); 75 75 76 76 function groups_add_forum_fields_sql( $sql = '' ) { 77 return 't.*, g.id as object_id, g.name as object_name, g.slug as object_slug'; 77 $sql = 't.*, g.id as object_id, g.name as object_name, g.slug as object_slug'; 78 return $sql; 78 79 } 79 80 … … 88 89 function groups_add_forum_where_sql( $sql = '' ) { 89 90 global $bp; 91 92 // Define locale variable 93 $parts = array(); 90 94 91 95 // Set this for groups … … 153 157 } 154 158 add_filter( 'get_latest_topics_fields', 'groups_filter_forums_root_page_sql' ); 159 155 160 ?> -
trunk/bp-groups/bp-groups-forums.php
r5642 r5689 1 1 <?php 2 /*** Group Forums **************************************************************/ 2 3 /** 4 * BuddyPress Groups Forums 5 * 6 * Action functions are exactly the same as screen functions, however they do not 7 * have a template screen associated with them. Usually they will send the user 8 * back to the default screen after execution. 9 * 10 * @package BuddyPress 11 * @subpackage GroupsForums 12 */ 3 13 4 14 // Exit if accessed directly -
trunk/bp-groups/bp-groups-functions.php
r5687 r5689 56 56 57 57 function groups_create_group( $args = '' ) { 58 global $bp;59 58 60 59 extract( $args ); … … 72 71 */ 73 72 74 if ( isset( $group_id ) && $group_id)73 if ( !empty( $group_id ) ) 75 74 $group = groups_get_group( array( 'group_id' => $group_id ) ); 76 75 else 77 76 $group = new BP_Groups_Group; 78 77 79 if ( isset( $creator_id ) && $creator_id)78 if ( !empty( $creator_id ) ) 80 79 $group->creator_id = $creator_id; 81 80 else … … 92 91 93 92 if ( isset( $status ) ) { 94 if ( groups_is_valid_status( $status ) ) 93 if ( groups_is_valid_status( $status ) ) { 95 94 $group->status = $status; 95 } 96 96 } 97 97 98 98 if ( isset( $enable_forum ) ) 99 99 $group->enable_forum = $enable_forum; 100 else if ( !$group_id&& !isset( $enable_forum ) )100 else if ( empty( $group_id ) && !isset( $enable_forum ) ) 101 101 $group->enable_forum = 1; 102 102 … … 116 116 $member->is_confirmed = 1; 117 117 $member->date_modified = bp_core_current_time(); 118 119 118 $member->save(); 119 120 120 do_action( 'groups_create_group', $group->id, $member, $group ); 121 121 … … 130 130 131 131 function groups_edit_base_group_details( $group_id, $group_name, $group_desc, $notify_members ) { 132 global $bp;133 132 134 133 if ( empty( $group_name ) || empty( $group_desc ) ) … … 152 151 153 152 function groups_edit_group_settings( $group_id, $enable_forum, $status, $invite_status = false ) { 154 global $bp;155 153 156 154 $group = groups_get_group( array( 'group_id' => $group_id ) ); … … 264 262 global $bp; 265 263 266 if ( !$user_id)264 if ( empty( $user_id ) ) 267 265 $user_id = bp_loggedin_user_id(); 268 266 … … 305 303 global $bp; 306 304 307 if ( !$user_id)305 if ( empty( $user_id ) ) 308 306 $user_id = bp_loggedin_user_id(); 309 307 … … 379 377 380 378 function groups_get_groups( $args = '' ) { 381 global $bp;382 379 383 380 $defaults = array( … … 388 385 'search_terms' => false, // Limit to groups that match these search terms 389 386 'show_hidden' => false, // Show hidden groups to non-admins 390 391 387 'per_page' => 20, // The number of results to return per page 392 388 'page' => 1, // The page to return if limiting per page … … 412 408 413 409 function groups_get_user_groups( $user_id = 0, $pag_num = 0, $pag_page = 0 ) { 414 global $bp; 415 416 if ( !$user_id ) 410 411 if ( empty( $user_id ) ) 417 412 $user_id = bp_displayed_user_id(); 418 413 … … 421 416 422 417 function groups_total_groups_for_user( $user_id = 0 ) { 423 global $bp; 424 425 if ( !$user_id ) 418 419 if ( empty( $user_id ) ) 426 420 $user_id = ( bp_displayed_user_id() ) ? bp_displayed_user_id() : bp_loggedin_user_id(); 427 421 … … 548 542 549 543 function groups_get_invites_for_user( $user_id = 0, $limit = false, $page = false, $exclude = false ) { 550 global $bp; 551 552 if ( !$user_id ) 544 545 if ( empty( $user_id ) ) 553 546 $user_id = bp_loggedin_user_id(); 554 547 … … 557 550 558 551 function groups_invite_user( $args = '' ) { 559 global $bp;560 552 561 553 $defaults = array( … … 570 562 extract( $args, EXTR_SKIP ); 571 563 572 if ( !$user_id || !$group_id)564 if ( empty( $user_id ) || empty( $group_id ) ) 573 565 return false; 574 566 … … 591 583 592 584 function groups_uninvite_user( $user_id, $group_id ) { 593 global $bp;594 585 595 586 if ( !BP_Groups_Member::delete( $user_id, $group_id ) ) … … 648 639 649 640 function groups_send_invites( $user_id, $group_id ) { 650 global $bp; 651 652 if ( !$user_id ) 641 642 if ( empty( $user_id ) ) 653 643 $user_id = bp_loggedin_user_id(); 654 644 … … 711 701 712 702 function groups_demote_member( $user_id, $group_id ) { 713 global $bp; 703 704 if ( ! bp_is_item_admin() || ! bp_is_item_mod() ) 705 return false; 714 706 715 707 $member = new BP_Groups_Member( $user_id, $group_id ); … … 761 753 762 754 function groups_send_membership_request( $requesting_user_id, $group_id ) { 763 global $bp;764 755 765 756 // Prevent duplicate requests … … 797 788 798 789 function groups_accept_membership_request( $membership_id, $user_id = 0, $group_id = 0 ) { 799 global $bp; 800 801 if ( $user_id && $group_id ) 790 791 if ( !empty( $user_id ) && !empty( $group_id ) ) 802 792 $membership = new BP_Groups_Member( $user_id, $group_id ); 803 793 else … … 847 837 848 838 function groups_delete_membership_request( $membership_id, $user_id = 0, $group_id = 0 ) { 849 if ( $user_id && $group_id)839 if ( !empty( $user_id ) && !empty( $group_id ) ) 850 840 $membership = new BP_Groups_Member( $user_id, $group_id ); 851 841 else -
trunk/bp-groups/bp-groups-notifications.php
r5431 r5689 4 4 5 5 function groups_notification_group_updated( $group_id ) { 6 global $bp;7 6 8 7 $group = groups_get_group( array( 'group_id' => $group_id ) ); … … 47 46 48 47 function groups_notification_new_membership_request( $requesting_user_id, $admin_id, $group_id, $membership_id ) { 49 global $bp;50 48 51 49 bp_core_add_notification( $requesting_user_id, $admin_id, 'groups', 'new_membership_request', $group_id ); … … 55 53 56 54 $requesting_user_name = bp_core_get_user_displayname( $requesting_user_id ); 57 $group = groups_get_group( array( 'group_id' => $group_id ) ); 58 59 $ud = bp_core_get_core_userdata($admin_id); 60 $requesting_ud = bp_core_get_core_userdata($requesting_user_id); 61 55 $group = groups_get_group( array( 'group_id' => $group_id ) ); 56 57 $ud = bp_core_get_core_userdata( $admin_id ); 58 $requesting_ud = bp_core_get_core_userdata( $requesting_user_id ); 62 59 $group_requests = bp_get_group_permalink( $group ) . 'admin/membership-requests'; 63 60 $profile_link = bp_core_get_user_domain( $requesting_user_id ); … … 96 93 97 94 function groups_notification_membership_request_completed( $requesting_user_id, $group_id, $accepted = true ) { 98 global $bp;99 95 100 96 // Post a screen notification first. … … 153 149 154 150 function groups_notification_promoted_member( $user_id, $group_id ) { 155 global $bp;156 151 157 152 if ( groups_is_user_admin( $user_id, $group_id ) ) { … … 202 197 203 198 function groups_notification_group_invites( &$group, &$member, $inviter_user_id ) { 204 global $bp; 205 206 $inviter_ud = bp_core_get_core_userdata( $inviter_user_id );199 200 // @todo $inviter_up may be used for caching, test without it 201 $inviter_ud = bp_core_get_core_userdata( $inviter_user_id ); 207 202 $inviter_name = bp_core_get_userlink( $inviter_user_id, true, false, true ); 208 203 $inviter_link = bp_core_get_user_domain( $inviter_user_id ); … … 219 214 return false; 220 215 221 $invited_ud = bp_core_get_core_userdata($invited_user_id); 222 216 $invited_ud = bp_core_get_core_userdata($invited_user_id); 223 217 $settings_link = bp_core_get_user_domain( $invited_user_id ) . bp_get_settings_slug() . '/notifications/'; 224 $invited_link = bp_core_get_user_domain( $invited_user_id );225 $invites_link = trailingslashit( $invited_link . bp_get_groups_slug() . '/invites' );218 $invited_link = bp_core_get_user_domain( $invited_user_id ); 219 $invites_link = trailingslashit( $invited_link . bp_get_groups_slug() . '/invites' ); 226 220 227 221 // Set up and send the message -
trunk/bp-groups/bp-groups-screens.php
r5687 r5689 820 820 */ 821 821 function groups_screen_notification_settings() { 822 global $bp;823 822 824 823 if ( !$group_invite = bp_get_user_meta( bp_displayed_user_id(), 'notification_groups_invite', true ) ) … … 879 878 } 880 879 add_action( 'bp_notification_settings', 'groups_screen_notification_settings' ); 880 881 881 ?> -
trunk/bp-groups/bp-groups-template.php
r5687 r5689 105 105 106 106 function __construct( $user_id, $type, $page, $per_page, $max, $slug, $search_terms, $populate_extras, $include = false, $exclude = false, $show_hidden = false ){ 107 108 global $bp;109 107 110 108 $this->pag_page = isset( $_REQUEST['grpage'] ) ? intval( $_REQUEST['grpage'] ) : $page; … … 163 161 164 162 // Build pagination links 165 if ( (int) $this->total_group_count && (int)$this->pag_num ) {163 if ( (int) $this->total_group_count && (int)$this->pag_num ) { 166 164 $this->pag_links = paginate_links( array( 167 165 'base' => add_query_arg( array( 'grpage' => '%#%', 'num' => $this->pag_num, 's' => $search_terms, 'sortby' => $this->sort_by, 'order' => $this->order ) ), … … 211 209 212 210 function the_group() { 213 global $group;214 215 211 $this->in_the_loop = true; 216 $this->group = $this->next_group();212 $this->group = $this->next_group(); 217 213 218 214 if ( $this->single_group ) … … 298 294 299 295 function bp_group_is_visible( $group = false ) { 300 global $ bp, $groups_template;296 global $groups_template; 301 297 302 298 if ( bp_current_user_can( 'bp_moderate' ) ) … … 382 378 383 379 $defaults = array( 384 'type' => 'full',385 'width' => false,380 'type' => 'full', 381 'width' => false, 386 382 'height' => false, 387 'class' => 'avatar',388 'id' => false,389 'alt' => sprintf( __( 'Group logo of %s', 'buddypress' ), $groups_template->group->name )383 'class' => 'avatar', 384 'id' => false, 385 'alt' => sprintf( __( 'Group logo of %s', 'buddypress' ), $groups_template->group->name ) 390 386 ); 391 387 … … 439 435 } 440 436 function bp_get_group_permalink( $group = false ) { 441 global $groups_template , $bp;437 global $groups_template; 442 438 443 439 if ( empty( $group ) ) … … 451 447 } 452 448 function bp_get_group_admin_permalink( $group = false ) { 453 global $groups_template , $bp;449 global $groups_template; 454 450 455 451 if ( empty( $group ) ) … … 668 664 } 669 665 function bp_get_group_all_members_permalink( $group = false ) { 670 global $groups_template , $bp;666 global $groups_template; 671 667 672 668 if ( empty( $group ) ) … … 677 673 678 674 function bp_group_search_form() { 679 global $ groups_template, $bp;675 global $bp; 680 676 681 677 $action = $bp->displayed_user->domain . bp_get_groups_slug() . '/my-groups/search/'; … … 721 717 } 722 718 function bp_get_groups_pagination_count() { 723 global $ bp, $groups_template;719 global $groups_template; 724 720 725 721 $start_num = intval( ( $groups_template->pag_page - 1 ) * $groups_template->pag_num ) + 1; 726 $from_num = bp_core_number_format( $start_num );727 $to_num = bp_core_number_format( ( $start_num + ( $groups_template->pag_num - 1 ) > $groups_template->total_group_count ) ? $groups_template->total_group_count : $start_num + ( $groups_template->pag_num - 1 ) );728 $total = bp_core_number_format( $groups_template->total_group_count );722 $from_num = bp_core_number_format( $start_num ); 723 $to_num = bp_core_number_format( ( $start_num + ( $groups_template->pag_num - 1 ) > $groups_template->total_group_count ) ? $groups_template->total_group_count : $start_num + ( $groups_template->pag_num - 1 ) ); 724 $total = bp_core_number_format( $groups_template->total_group_count ); 729 725 730 726 return apply_filters( 'bp_get_groups_pagination_count', sprintf( __( 'Viewing group %1$s to %2$s (of %3$s groups)', 'buddypress' ), $from_num, $to_num, $total ) ); … … 1076 1072 1077 1073 function bp_group_mod_memberlist( $admin_list = false, $group = false ) { 1078 global $groups_template , $group_mods;1074 global $groups_template; 1079 1075 1080 1076 if ( empty( $group ) ) … … 1138 1134 1139 1135 function bp_group_has_moderators( $group = false ) { 1140 global $group _mods, $groups_template;1136 global $groups_template; 1141 1137 1142 1138 if ( empty( $group ) ) … … 1150 1146 } 1151 1147 function bp_get_group_member_promote_mod_link( $args = '' ) { 1152 global $members_template, $groups_template , $bp;1148 global $members_template, $groups_template; 1153 1149 1154 1150 $defaults = array( … … 1167 1163 } 1168 1164 function bp_get_group_member_promote_admin_link( $args = '' ) { 1169 global $members_template, $groups_template , $bp;1165 global $members_template, $groups_template; 1170 1166 1171 1167 $defaults = array( … … 1189 1185 } 1190 1186 function bp_get_group_member_demote_link( $user_id = 0, $group = false ) { 1191 global $members_template, $groups_template , $bp;1187 global $members_template, $groups_template; 1192 1188 1193 1189 if ( empty( $group ) ) … … 1209 1205 } 1210 1206 function bp_get_group_member_ban_link( $user_id = 0, $group = false ) { 1211 global $ members_template, $groups_template, $bp;1207 global $groups_template; 1212 1208 1213 1209 if ( empty( $group ) ) … … 1247 1243 } 1248 1244 function bp_get_group_member_remove_link( $user_id = 0, $group = false ) { 1249 global $ members_template, $groups_template;1245 global $groups_template; 1250 1246 1251 1247 if ( empty( $group ) ) -
trunk/bp-groups/bp-groups-widgets.php
r5574 r5689 29 29 30 30 function widget( $args, $instance ) { 31 global $bp;32 33 31 $user_id = apply_filters( 'bp_group_widget_user_id', '0' ); 34 32 … … 143 141 144 142 function groups_ajax_widget_groups_list() { 145 global $bp;146 143 147 144 check_ajax_referer('groups_widget_groups_list'); … … 200 197 } 201 198 add_action( 'wp_ajax_widget_groups_list', 'groups_ajax_widget_groups_list' ); 199 202 200 ?>
Note: See TracChangeset
for help on using the changeset viewer.