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-blogs/bp-blogs-activity.php

    r11237 r11256  
    548548
    549549        // Use comments_open().
    550         remove_filter( 'comments_open', 'bp_comments_open', 10, 2 );
     550        remove_filter( 'comments_open', 'bp_comments_open', 10 );
    551551        $open = comments_open( $activity->secondary_item_id );
    552552        add_filter( 'comments_open', 'bp_comments_open', 10, 2 );
     
    807807
    808808    // Prevent separate activity entry being made.
    809     remove_action( 'comment_post', 'bp_activity_post_type_comment', 10, 2 );
     809    remove_action( 'comment_post', 'bp_activity_post_type_comment', 10 );
    810810
    811811    // Handle multisite.
     
    971971
    972972    // No need to edit the activity, as it's the activity who's updating the comment
    973     remove_action( 'transition_comment_status',     'bp_activity_transition_post_type_comment_status', 10, 3 );
    974     remove_action( 'bp_activity_post_type_comment', 'bp_blogs_comment_sync_activity_comment',          10, 4 );
     973    remove_action( 'transition_comment_status', 'bp_activity_transition_post_type_comment_status', 10 );
     974    remove_action( 'bp_activity_post_type_comment', 'bp_blogs_comment_sync_activity_comment', 10 );
    975975
    976976    if ( 1 === $activity->is_spam && 'spam' !== $post_comment_status ) {
Note: See TracChangeset for help on using the changeset viewer.