BP_Groups_Member::delete_all( int $group_id )

Delete all memberships for a given group.


Parameters Parameters

$group_id

(int) (Required) ID of the group.


Top ↑

Return Return

(int) Number of records deleted.


Source Source

File: bp-groups/classes/class-bp-groups-member.php

	public static function delete_all( $group_id ) {
		global $wpdb;

		$bp = buddypress();

		return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->groups->table_name_members} WHERE group_id = %d", $group_id ) );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.