Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/22/2018 03:11:02 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Moderation: remove references to blacklist/whitelist verbiage.

This change combines 2 functions into 1, merging _blacklist() checks into _moderation() checks. A new $strict parameter is added, when set to true will continue to check against the WordPress blacklist_keys option name.

  • Tests updated
  • bbp_check_for_blacklist() deprecated
  • Error response keys renamed (non breaking - nothing relies on them)
  • Some docs updates

Fixes #3215. For 2.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/forums/functions.php

    r6848 r6855  
    235235    }
    236236
    237     /** Forum Blacklist *******************************************************/
    238 
    239     if ( ! bbp_check_for_blacklist( $anonymous_data, $forum_author, $forum_title, $forum_content ) ) {
    240         bbp_add_error( 'bbp_forum_blacklist', __( '<strong>ERROR</strong>: Your forum cannot be created at this time.', 'bbpress' ) );
     237    /** Forum Bad Words *******************************************************/
     238
     239    if ( ! bbp_check_for_moderation( $anonymous_data, $forum_author, $forum_title, $forum_content, true ) ) {
     240        bbp_add_error( 'bbp_forum_moderation', __( '<strong>ERROR</strong>: Your forum cannot be created at this time.', 'bbpress' ) );
    241241    }
    242242
     
    474474    }
    475475
    476     /** Forum Blacklist *******************************************************/
    477 
    478     if ( ! bbp_check_for_blacklist( $anonymous_data, bbp_get_forum_author_id( $forum_id ), $forum_title, $forum_content ) ) {
    479         bbp_add_error( 'bbp_forum_blacklist', __( '<strong>ERROR</strong>: Your forum cannot be edited at this time.', 'bbpress' ) );
     476    /** Forum Bad Words *******************************************************/
     477
     478    if ( ! bbp_check_for_moderation( $anonymous_data, bbp_get_forum_author_id( $forum_id ), $forum_title, $forum_content, true ) ) {
     479        bbp_add_error( 'bbp_forum_moderation', __( '<strong>ERROR</strong>: Your forum cannot be edited at this time.', 'bbpress' ) );
    480480    }
    481481
Note: See TracChangeset for help on using the changeset viewer.