BP_Attachment::upload_dir_filter( array $upload_dir = array() )
Default filter to save the attachments.
Description Description
Parameters Parameters
- $upload_dir
-
(Optional) The original Uploads dir.
Default value: array()
Return Return
(array) The upload directory data.
Source Source
File: bp-core/classes/class-bp-attachment.php
public function upload_dir_filter( $upload_dir = array() ) { /** * Filters the component's upload directory. * * @since 2.3.0 * @since 2.4.0 Include the original Upload directory as the second parameter of the filter. * * @param array $value Array containing the path, URL, and other helpful settings. * @param array $upload_dir The original Uploads dir. */ return apply_filters( 'bp_attachment_upload_dir', array( 'path' => $this->upload_path, 'url' => $this->url, 'subdir' => false, 'basedir' => $this->upload_path, 'baseurl' => $this->url, 'error' => false ), $upload_dir ); }
Changelog Changelog
Version | Description |
---|---|
2.4.0 | Add the $upload_dir parameter to the method regarding to context |
2.3.0 | Introduced. |