Friends::accept( $args,  $assoc_args )

Mark a friendship request as accepted.


Description Description

Top ↑

OPTIONS OPTIONS

… : ID(s) of the friendship(s).
## EXAMPLES
$ wp bp friend accept-invitation 2161 Success: Friendship successfully accepted.
$ wp bp friend accept 2161 Success: Friendship successfully accepted.


Source Source

File: cli/src/friends.php

	public function accept( $args, $assoc_args ) {
		parent::_update( $args, $assoc_args, function( $friendship_id ) {
			if ( friends_accept_friendship( (int) $friendship_id ) ) {
				return array( 'success', 'Friendship successfully accepted.' );
			} else {
				return array( 'error', 'There was a problem accepting the friendship.' );
			}
		} );
	}


Top ↑

User Contributed Notes User Contributed Notes

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