BP_Akismet::mark_as_spam( BP_Activity_Activity $activity, string $source )
Mark activity item as spam.
Description
Parameters
- $activity
-
(Required) Activity item being spammed.
- $source
-
(Required) Either "by_a_person" (e.g. a person has manually marked the activity as spam) or "by_akismet" (automatically spammed).
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 BuddyPress 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 ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.6.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.