Changeset 9666
- Timestamp:
- 03/31/2015 05:37:52 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/classes/class-bp-groups-member.php
r9491 r9666 356 356 global $wpdb; 357 357 358 /** 359 * Fires before a member is removed from a group. 360 * 361 * @since BuddyPress (2.3.0) 362 * 363 * @param BP_Groups_Member Current group membership object. 364 */ 365 do_action_ref_array( 'groups_member_before_remove', array( $this ) ); 366 358 367 $bp = buddypress(); 359 368 $sql = $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d", $this->user_id, $this->group_id ); … … 368 377 self::refresh_total_member_count_for_group( $this->group_id ); 369 378 379 /** 380 * Fires after a member is removed from a group. 381 * 382 * @since BuddyPress (2.3.0) 383 * 384 * @param BP_Groups_Member Current group membership object. 385 */ 386 do_action_ref_array( 'groups_member_after_remove', array( $this ) ); 387 370 388 return $result; 371 389 } … … 407 425 global $wpdb; 408 426 427 /** 428 * Fires before a group membership is deleted. 429 * 430 * @since BuddyPress (2.3.0) 431 * 432 * @param int $user_id ID of the user. 433 * @param int $group_id ID of the group. 434 */ 435 do_action( 'bp_groups_member_before_delete', $user_id, $group_id ); 436 409 437 $bp = buddypress(); 410 438 $remove = $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d", $user_id, $group_id ) ); … … 415 443 // Update the group's member count 416 444 self::refresh_total_member_count_for_group( $group_id ); 445 446 /** 447 * Fires after a member is removed from a group. 448 * 449 * @since BuddyPress (2.3.0) 450 * 451 * @param int $user_id ID of the user. 452 * @param int $group_id ID of the group. 453 */ 454 do_action( 'bp_groups_member_after_delete', $user_id, $group_id ); 417 455 418 456 return $remove;
Note: See TracChangeset
for help on using the changeset viewer.