Skip to:
Content

BuddyPress.org

Ticket #8338: 8338.patch

File 8338.patch, 1.1 KB (added by imath, 4 years ago)
  • src/bp-core/bp-core-moderation.php

    diff --git src/bp-core/bp-core-moderation.php src/bp-core/bp-core-moderation.php
    index 8d2a9c775..2a0906f9d 100644
    function bp_core_check_for_moderation( $user_id = 0, $title = '', $content = '', 
    190190 * @since 1.6.0
    191191 * @since 2.6.0 Added $error_type parameter.
    192192 *
    193  * @todo Why don't we use wp_blacklist_check() for this?
     193 * @todo Why don't we use wp_check_comment_disallowed_list() for this?
    194194 *
    195195 * @param int    $user_id    User ID.
    196196 * @param string $title      The title of the content.
    function bp_core_check_for_blacklist( $user_id = 0, $title = '', $content = '', 
    224224
    225225        /** Blacklist ************************************************************
    226226         */
     227        $disallowed_keys_option_name = 'blacklist_keys';
     228        if ( function_exists( 'wp_check_comment_disallowed_list' ) ) {
     229                $disallowed_keys_option_name = 'disallowed_keys';
     230        }
    227231
    228232        // Get the moderation keys.
    229         $blacklist = trim( get_option( 'blacklist_keys' ) );
     233        $blacklist = trim( get_option( $disallowed_keys_option_name ) );
    230234
    231235        // Bail if blacklist is empty.
    232236        if ( empty( $blacklist ) ) {