Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/31/2020 02:26:38 PM (7 months ago)
Author:
boonebgorges
Message:

Remove 'whitelist' and 'blacklist' language from moderation checks.

This is part of a series of changes meant to promote clarity and
inclusiveness in the language used in our codebase.

See #8339.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-filters.php

    r12694 r12698  
    118118// Activity stream moderation.
    119119add_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 );
     120add_action( 'bp_activity_before_save', 'bp_activity_check_disallowed_keys',  2, 1 );
    121121
    122122/** Functions *****************************************************************/
     
    173173 * Mark the posted activity as spam, if it contains disallowed keywords.
    174174 *
    175  * @since 1.6.0
     175 * @since 7.0.0
    176176 *
    177177 * @param BP_Activity_Activity $activity The activity object to check.
    178178 */
    179 function bp_activity_check_blacklist_keys( $activity ) {
     179function bp_activity_check_disallowed_keys( $activity ) {
    180180
    181181    // Only check specific types of activity updates.
     
    186186    // Send back the error so activity update fails.
    187187    // @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;
    191191
    192192        // Backpat.
Note: See TracChangeset for help on using the changeset viewer.