Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/29/2020 06:44:23 PM (4 years ago)
Author:
boonebgorges
Message:

Remove terms blacklist and whitelist in inline comments and local variables.

The change is in order to promote clearer and more inclusive language.

See #8339.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-moderation.php

    r11447 r12694  
    142142
    143143    // Get the moderation keys.
    144     $blacklist = trim( get_option( 'moderation_keys' ) );
    145 
    146     // Bail if blacklist is empty.
    147     if ( ! empty( $blacklist ) ) {
     144    $disallowed = trim( get_option( 'moderation_keys' ) );
     145
     146    // Bail if list is empty.
     147    if ( ! empty( $disallowed ) ) {
    148148
    149149        // Get words separated by new lines.
    150         $words = explode( "\n", $blacklist );
     150        $words = explode( "\n", $disallowed );
    151151
    152152        // Loop through words.
     
    227227
    228228    // Get the moderation keys.
    229     $blacklist = trim( get_option( 'blacklist_keys' ) );
    230 
    231     // Bail if blacklist is empty.
    232     if ( empty( $blacklist ) ) {
     229    $disallowed = get_option( 'disallowed_keys' );
     230
     231    // Support for WP < 5.5.
     232    if ( false === $disallowed ) {
     233        $disallowed = get_option( 'blacklist_keys' );
     234    }
     235
     236    $disallowed = trim( $disallowed );
     237
     238    // Bail if disallowed list is empty.
     239    if ( empty( $disallowed ) ) {
    233240        return true;
    234241    }
     
    263270
    264271    // Get words separated by new lines.
    265     $words = explode( "\n", $blacklist );
     272    $words = explode( "\n", $disallowed );
    266273
    267274    // Loop through words.
Note: See TracChangeset for help on using the changeset viewer.