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

Mark activity item as ham.


Description Description


Parameters Parameters

$activity

(Required) Activity item being hammed.

$source

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


Top ↑

Source Source

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

	public function mark_as_ham( $activity, $source ) {
		// If the activity was, originally, automatically marked as spam by Akismet, run the @mentions filter as it would have been skipped.
		if ( 'true' == bp_activity_get_meta( $activity->id, '_bp_akismet_result' ) && !bp_activity_get_meta( $activity->id, '_bp_akismet_user_result' ) )
			$activity->content = bp_activity_at_name_filter( $activity->content, $activity->id );

		/**
		 * Fires after marking an activity item has been marked as ham.
		 *
		 * @since 1.6.0
		 *
		 * @param BP_Activity_Activity $activity Activity object being marked as ham.
		 * @param string               $source   Source of the whom marked as ham.
		 *                                       Either "by_a_person" (e.g. a person has
		 *                                       manually marked the activity as ham) or
		 *                                       "by_akismet" (automatically hammed).
		 */
		do_action( 'bp_activity_akismet_mark_as_ham', $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.