BP_Akismet::update_activity_spam_meta( BP_Activity_Activity $activity )

Update activity meta after a manual spam change (user-initiated).


Parameters Parameters

$activity

(BP_Activity_Activity) (Required) The activity to check.


Source Source

File: bp-activity/classes/class-bp-akismet.php

	public function update_activity_spam_meta( $activity ) {
		// By default, only handle activity updates and activity comments.
		if ( !in_array( $activity->type, BP_Akismet::get_activity_types() ) )
			return;

		$this->update_activity_history(
			$activity->id,
			sprintf(
				/* translators: %s: the current user username */
				__( '%s reported this activity as spam', 'buddypress' ),
				bp_get_loggedin_user_username()
			),
			'report-spam'
		);

		bp_activity_update_meta( $activity->id, '_bp_akismet_user_result', 'true' );
		bp_activity_update_meta( $activity->id, '_bp_akismet_user', bp_get_loggedin_user_username() );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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