BP_Friends_Friendship::reject( int $friendship_id )
Remove a connection or a connection request MADE OF the logged-in user.
Description
Parameters
- $friendship_id
-
(Required) ID of the friendship to be rejected.
Return
(int) Number of database rows deleted.
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() ) ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.