Changeset 11542
- Timestamp:
- 04/27/2017 05:24:04 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/classes/class-bp-attachment.php
r11256 r11542 220 220 add_filter( "{$this->action}_prefilter", array( $this, 'validate_upload' ), 10, 1 ); 221 221 222 /**223 * The above dynamic filter was introduced in WordPress 4.0, as we support WordPress224 * back to 3.6, we need to also use the pre 4.0 static filter and remove it after225 * the upload was processed.226 */227 add_filter( 'wp_handle_upload_prefilter', array( $this, 'validate_upload' ), 10, 1 );228 229 222 // Set Default overrides. 230 223 $overrides = array( … … 276 269 remove_filter( 'upload_dir', $upload_dir_filter, 10 ); 277 270 } 278 279 // Remove the pre WordPress 4.0 static filter.280 remove_filter( 'wp_handle_upload_prefilter', array( $this, 'validate_upload' ), 10 );281 271 282 272 // Finally return the uploaded file or the error.
Note: See TracChangeset
for help on using the changeset viewer.