Changeset 9491 for trunk/src/bp-groups/classes/class-bp-groups-member.php
- Timestamp:
- 02/17/2015 06:42:09 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/classes/class-bp-groups-member.php
r9486 r9491 220 220 $this->invite_sent = apply_filters( 'groups_member_invite_sent_before_save', $this->invite_sent, $this->id ); 221 221 222 /** 223 * Fires before the current group membership item gets saved. 224 * 225 * Please use this hook to filter the properties above. Each part will be passed in. 226 * 227 * @since BuddyPress (1.0.0) 228 * 229 * @param BP_Groups_Member Current instance of the group membership item being saved. Passed by reference. 230 */ 222 231 do_action_ref_array( 'groups_member_before_save', array( &$this ) ); 223 232 … … 244 253 self::refresh_total_member_count_for_group( $this->group_id ); 245 254 255 /** 256 * Fires after the current group membership item has been saved. 257 * 258 * Please use this hook to filter the properties above. Each part will be passed in. 259 * 260 * @since BuddyPress (1.0.0) 261 * 262 * @param BP_Groups_Member Current instance of the group membership item has been saved. Passed by reference. 263 */ 246 264 do_action_ref_array( 'groups_member_after_save', array( &$this ) ); 247 265 … … 928 946 929 947 if ( bp_is_active( 'xprofile' ) ) { 948 949 /** 950 * Filters the SQL prepared statement used to fetch group members. 951 * 952 * @since BuddyPress (1.5.0) 953 * 954 * @param string $value SQL prepared statement for fetching group members. 955 */ 930 956 $members = $wpdb->get_results( apply_filters( 'bp_group_members_user_join_filter', $wpdb->prepare( "SELECT m.user_id, m.date_modified, m.is_banned, u.user_login, u.user_nicename, u.user_email, pd.value as display_name FROM {$bp->groups->table_name_members} m, {$wpdb->users} u, {$bp->profile->table_name_data} pd WHERE u.ID = m.user_id AND u.ID = pd.user_id AND pd.field_id = 1 AND group_id = %d AND is_confirmed = 1 {$banned_sql} {$exclude_admins_sql} {$exclude_sql} ORDER BY m.date_modified DESC {$pag_sql}", $group_id ) ) ); 931 957 } else { 958 959 /** This filter is documented in bp-groups/bp-groups-classes */ 932 960 $members = $wpdb->get_results( apply_filters( 'bp_group_members_user_join_filter', $wpdb->prepare( "SELECT m.user_id, m.date_modified, m.is_banned, u.user_login, u.user_nicename, u.user_email, u.display_name FROM {$bp->groups->table_name_members} m, {$wpdb->users} u WHERE u.ID = m.user_id AND group_id = %d AND is_confirmed = 1 {$banned_sql} {$exclude_admins_sql} {$exclude_sql} ORDER BY m.date_modified DESC {$pag_sql}", $group_id ) ) ); 933 961 } … … 940 968 $total_member_count = count( $members ); 941 969 } else { 970 971 /** 972 * Filters the SQL prepared statement used to fetch group members total count. 973 * 974 * @since BuddyPress (1.5.0) 975 * 976 * @param string $value SQL prepared statement for fetching group member count. 977 */ 942 978 $total_member_count = $wpdb->get_var( apply_filters( 'bp_group_members_count_user_join_filter', $wpdb->prepare( "SELECT COUNT(user_id) FROM {$bp->groups->table_name_members} m WHERE group_id = %d AND is_confirmed = 1 {$banned_sql} {$exclude_admins_sql} {$exclude_sql}", $group_id ) ) ); 943 979 }
Note: See TracChangeset
for help on using the changeset viewer.