Changeset 12698 for trunk/src/bp-activity/bp-activity-filters.php
- Timestamp:
- 07/31/2020 02:26:38 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-filters.php
r12694 r12698 118 118 // Activity stream moderation. 119 119 add_action( 'bp_activity_before_save', 'bp_activity_check_moderation_keys', 2, 1 ); 120 add_action( 'bp_activity_before_save', 'bp_activity_check_ blacklist_keys', 2, 1 );120 add_action( 'bp_activity_before_save', 'bp_activity_check_disallowed_keys', 2, 1 ); 121 121 122 122 /** Functions *****************************************************************/ … … 173 173 * Mark the posted activity as spam, if it contains disallowed keywords. 174 174 * 175 * @since 1.6.0175 * @since 7.0.0 176 176 * 177 177 * @param BP_Activity_Activity $activity The activity object to check. 178 178 */ 179 function bp_activity_check_ blacklist_keys( $activity ) {179 function bp_activity_check_disallowed_keys( $activity ) { 180 180 181 181 // Only check specific types of activity updates. … … 186 186 // Send back the error so activity update fails. 187 187 // @todo This is temporary until some kind of trash status is built. 188 $ blacklist = bp_core_check_for_blacklist( $activity->user_id, '', $activity->content, 'wp_error' );189 if ( is_wp_error( $ blacklist) ) {190 $activity->errors = $ blacklist;188 $disallowed = bp_core_check_for_disallowed_keys( $activity->user_id, '', $activity->content, 'wp_error' ); 189 if ( is_wp_error( $disallowed ) ) { 190 $activity->errors = $disallowed; 191 191 192 192 // Backpat.
Note: See TracChangeset
for help on using the changeset viewer.