BP_Friends_Friendship::reject( int $friendship_id )

Remove a friendship or a friendship request MADE OF the logged-in user.


Parameters Parameters

$friendship_id

(int) (Required) ID of the friendship to be rejected.


Top ↑

Return Return

(int) Number of database rows deleted.


Source Source

File: bp-friends/classes/class-bp-friends-friendship.php

	public static function reject($friendship_id) {
		global $wpdb;

		$bp = buddypress();

		return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->friends->table_name} WHERE id = %d AND friend_user_id = %d", $friendship_id, bp_loggedin_user_id() ) );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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