Skip to:
Content

BuddyPress.org


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

    r11091 r11256  
    2323    public function tearDown() {
    2424        parent::tearDown();
    25         remove_filter( 'bp_attachment_upload_overrides',     array( $this, 'filter_overrides' ),       10, 1 );
    26         remove_filter( 'upload_dir',                         array( $this, 'filter_upload_dir' ),      20, 1 );
     25        remove_filter( 'bp_attachment_upload_overrides',     array( $this, 'filter_overrides' ),       10 );
     26        remove_filter( 'upload_dir',                         array( $this, 'filter_upload_dir' ),      20 );
    2727        add_filter( 'bp_attachments_cover_image_upload_dir', array( $this, 'filter_cover_image_dir' ), 10, 2 );
    2828        $this->upload_results = array();
     
    490490
    491491        // Remove the filter used to fake uploads
    492         remove_filter( 'upload_dir', array( $this, 'filter_upload_dir' ), 20, 1 );
     492        remove_filter( 'upload_dir', array( $this, 'filter_upload_dir' ), 20 );
    493493
    494494        $this->assertSame( $attachment_class->original_upload_dir, wp_upload_dir() );
Note: See TracChangeset for help on using the changeset viewer.