Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/28/2016 10:33:55 PM (8 years ago)
Author:
djpaul
Message:

Fix incorrect remove_action and remove_filter usage for WordPress 4.7.

remove_action and remove_filter formally accepted a fourth parameter until WP 4.7; it's only with the introduction of the WP_Hook class that the function signature changed. Prior to WP 4.7, the fourth parameter was unused, so it does no harm to remove it and tidy things up.

Fixes #7318

Props ketuchetan

File:
1 edited

Legend:

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

    r11168 r11256  
    14461446
    14471447    // Remove the filter for future activity items.
    1448     remove_filter( 'bp_activity_generate_action_string', $actions->{$activity->component}->{$activity->type}['format_callback'], 10, 2 );
     1448    remove_filter( 'bp_activity_generate_action_string', $actions->{$activity->component}->{$activity->type}['format_callback'], 10 );
    14491449
    14501450    return $action;
     
    33223322    // If Akismet is active, and this was a manual spam/ham request, stop Akismet checking the activity.
    33233323    if ( 'by_a_person' == $source && !empty( $bp->activity->akismet ) ) {
    3324         remove_action( 'bp_activity_before_save', array( $bp->activity->akismet, 'check_activity' ), 4, 1 );
     3324        remove_action( 'bp_activity_before_save', array( $bp->activity->akismet, 'check_activity' ), 4 );
    33253325
    33263326        // Build data package for Akismet.
     
    33693369    // If Akismet is active, and this was a manual spam/ham request, stop Akismet checking the activity.
    33703370    if ( 'by_a_person' == $source && !empty( $bp->activity->akismet ) ) {
    3371         remove_action( 'bp_activity_before_save', array( $bp->activity->akismet, 'check_activity' ), 4, 1 );
     3371        remove_action( 'bp_activity_before_save', array( $bp->activity->akismet, 'check_activity' ), 4 );
    33723372
    33733373        // Build data package for Akismet.
Note: See TracChangeset for help on using the changeset viewer.