BP_Invitation::mark_accepted_by_data( array $args )

Mark invitations as accepted that are found by user_id, inviter_id, item id, and optional secondary item id, and class name.

Parameters Parameters


(array) (Required) See BP_Invitation::update().

Top ↑

Return Return

(int|bool) The number of rows updated, or false on error.

Source Source

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

	public static function mark_accepted_by_data( $args ) {

		// Values to be updated.
		$update_args = array(
			'accepted'      => 'accepted',
			'date_modified' => bp_core_current_time(),
		// Respect a specified `date-modified`.
		if ( ! empty( $args['date_modified'] ) ) {
			$update_args['date_modified'] = $args['date_modified'];

		return self::update( $update_args, $args );

Top ↑

Changelog Changelog

Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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