Skip to:
Content

BuddyPress.org

Changeset 11542


Ignore:
Timestamp:
04/27/2017 05:24:04 PM (8 years ago)
Author:
r-a-y
Message:

Attachments: Remove older 'wp_handle_upload_prefilter' filter.

This filter is only used for WordPress 3.9 and older installs. We no
longer support these versions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-attachment.php

    r11256 r11542  
    220220        add_filter( "{$this->action}_prefilter", array( $this, 'validate_upload' ), 10, 1 );
    221221
    222         /**
    223          * The above dynamic filter was introduced in WordPress 4.0, as we support WordPress
    224          * back to 3.6, we need to also use the pre 4.0 static filter and remove it after
    225          * the upload was processed.
    226          */
    227         add_filter( 'wp_handle_upload_prefilter', array( $this, 'validate_upload' ), 10, 1 );
    228 
    229222        // Set Default overrides.
    230223        $overrides = array(
     
    276269            remove_filter( 'upload_dir', $upload_dir_filter, 10 );
    277270        }
    278 
    279         // Remove the pre WordPress 4.0 static filter.
    280         remove_filter( 'wp_handle_upload_prefilter', array( $this, 'validate_upload' ), 10 );
    281271
    282272        // Finally return the uploaded file or the error.
Note: See TracChangeset for help on using the changeset viewer.