Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/28/2016 10:33:55 PM (7 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-core/classes/class-bp-attachment.php

    r10899 r11256  
    274274        // Restore WordPress Uploads data.
    275275        if ( ! empty( $upload_dir_filter ) ) {
    276             remove_filter( 'upload_dir', $upload_dir_filter, 10, $this->upload_dir_filter_args );
     276            remove_filter( 'upload_dir', $upload_dir_filter, 10 );
    277277        }
    278278
    279279        // Remove the pre WordPress 4.0 static filter.
    280         remove_filter( 'wp_handle_upload_prefilter', array( $this, 'validate_upload' ), 10, 1 );
     280        remove_filter( 'wp_handle_upload_prefilter', array( $this, 'validate_upload' ), 10 );
    281281
    282282        // Finally return the uploaded file or the error.
Note: See TracChangeset for help on using the changeset viewer.