Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/06/2015 10:23:53 PM (10 years ago)
Author:
r-a-y
Message:

Activity: Support only Akismet v3+.

For those using Akismet v3.0.x, notices started appearing due to Akismet
deprecating some older functions that were in use by the BP Activity
Akismet module.

Since Akismet 2.6.0 was released more than a year ago, we are upgrading
all calls in the BP Activity Akismet module to the new Akismet API. For
BuddyPress 2.3+, the BP Activity Akismet module will require at least
Akismet v3+.

Fixes #6191.

File:
1 edited

Legend:

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

    r9833 r9843  
    713713 *
    714714 * @since BuddyPress (1.6.0)
     715 * @since BuddyPress (2.3.0) We only support Akismet 3+.
    715716 */
    716717function bp_activity_setup_akismet() {
     
    718719
    719720    // Bail if Akismet is not active
    720     if ( ! defined( 'AKISMET_VERSION' ) )
     721    if ( ! defined( 'AKISMET_VERSION' ) ) {
    721722        return;
     723    }
     724
     725    // Bail if older version of Akismet
     726    if ( ! class_exists( 'Akismet' ) ) {
     727        return;
     728    }
    722729
    723730    // Bail if no Akismet key is set
    724     if ( ! bp_get_option( 'wordpress_api_key' ) && ! defined( 'WPCOM_API_KEY' ) )
     731    if ( ! bp_get_option( 'wordpress_api_key' ) && ! defined( 'WPCOM_API_KEY' ) ) {
    725732        return;
     733    }
    726734
    727735    /**
     
    732740     * @param bool $value Return value of bp_is_akismet_active boolean function.
    733741     */
    734     if ( ! apply_filters( 'bp_activity_use_akismet', bp_is_akismet_active() ) )
     742    if ( ! apply_filters( 'bp_activity_use_akismet', bp_is_akismet_active() ) ) {
    735743        return;
     744    }
    736745
    737746    // Instantiate Akismet for BuddyPress
Note: See TracChangeset for help on using the changeset viewer.