bp_activity_check_disallowed_keys( BP_Activity_Activity $activity )
Mark the posted activity as spam, if it contains disallowed keywords.
Parameters Parameters
- $activity
-
(BP_Activity_Activity) (Required) The activity object to check.
Source Source
File: bp-activity/bp-activity-filters.php
function bp_activity_check_disallowed_keys( $activity ) { // Only check specific types of activity updates. if ( ! in_array( $activity->type, bp_activity_get_moderated_activity_types() ) ) { return; } // Send back the error so activity update fails. // @todo This is temporary until some kind of trash status is built. $disallowed = bp_core_check_for_disallowed_keys( $activity->user_id, '', $activity->content, 'wp_error' ); if ( is_wp_error( $disallowed ) ) { $activity->errors = $disallowed; // Backpat. $activity->component = false; } }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
7.0.0 | Introduced. |