BP_Invitation_Manager::delete_by_id( int $id )

Delete an invitation by id.


Parameters Parameters

$id

(int) (Required) ID of the invitation to delete.


Top ↑

Return Return

(int|bool) Number of rows deleted on success, false on failure.


Source Source

File: bp-core/classes/class-bp-invitation-manager.php

	public function delete_by_id( $id ) {
		// Ensure that the invitation exists and was created by this class.
		$invite = new BP_Invitation( $id );
		if ( ! $invite->id || sanitize_key( $this->class_name ) !== $invite->class ) {
			return false;
		}

		return BP_Invitation::delete_by_id( $id );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
8.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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