public function upload_dir_filter() { $upload_dir_data = parent::upload_dir_filter(); if (!is_user_logged_in()) { return $upload_dir_data; } return array('path' => $this->upload_path . '/' . bp_loggedin_user_id(), 'url' => $this->url . '/' . bp_loggedin_user_id(), 'subdir' => '/' . bp_loggedin_user_id(), 'basedir' => $this->upload_path . '/' . bp_loggedin_user_id(), 'baseurl' => $this->url . '/' . bp_loggedin_user_id(), 'error' => false); }
public function upload_dir_filter($upload_dir = array()) { $this->original_upload_dir = $upload_dir; return parent::upload_dir_filter($upload_dir); }
/** * Set the directory when uploading a file * * @since 1.3.0 * @since 1.3.3 Add the $upload_dir parameter * * @return array upload data (path, url, basedir...) */ public function upload_dir_filter($upload_dir = array()) { $upload_data = parent::upload_dir_filter($upload_dir); /** * Filters BuddyDrive's upload data. * * If people used to filter 'buddydrive_upload_datas', we need * to have it here * * @since 1.0 * * @param array $value Array containing the path, URL, and other helpful settings. */ return apply_filters('buddydrive_upload_datas', $upload_data); }