BP_Akismet::mark_as_spam( BP_Activity_Activity $activity, string $source )

Mark activity item as spam.


Parameters Parameters

$activity

(BP_Activity_Activity) (Required) Activity item being spammed.

$source

(string) (Required) Either "by_a_person" (e.g. a person has manually marked the activity as spam) or "by_akismet" (automatically spammed).


Source Source

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

	public function mark_as_spam( $activity, $source ) {
		// Record this item so we can do some tidyup in BP_Akismet::check_member_activity_update().
		$this->last_activity = $activity;

		/**
		 * Fires after marking an activity item has been marked as spam.
		 *
		 * @since 1.6.0
		 *
		 * @param BP_Activity_Activity $activity Activity object being marked as spam.
		 * @param string               $source   Source of the whom marked as spam.
		 *                                       Either "by_a_person" (e.g. a person has
		 *                                       manually marked the activity as spam)
		 *                                       or "by_akismet".
		 */
		do_action( 'bp_activity_akismet_mark_as_spam', $activity, $source );
	}


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.