bp_legacy_theme_ajax_accept_friendship()

Accept a user friendship request via a POST request.


Return Return

(mixed) String on error, void on success.


Source Source

File: bp-templates/bp-legacy/buddypress-functions.php

function bp_legacy_theme_ajax_accept_friendship() {
	if ( ! bp_is_post_request() ) {
		return;
	}

	check_admin_referer( 'friends_accept_friendship' );

	if ( ! friends_accept_friendship( (int) $_POST['id'] ) )
		echo "-1<div id='message' class='error'><p>" . __( 'There was a problem accepting that request. Please try again.', 'buddypress' ) . '</p></div>';

	exit;
}


Top ↑

Changelog Changelog

Changelog
Version Description
1.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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