If you wish to override the base dir for the upload directory (by default wordpress base dir is: /wp-content/uploads/) you can use this filter.
Accepts 1 parameter:
$param – Current wp_upload_dir();
$param['path'] = WP_CONTENT_DIR.'/custom_uploads'.$feuGT_options['general']['uploadFolder']['value']; //REQUIRED FOR VALID CHANGE
$param['url'] = WP_CONTENT_URL.'/custom_uploads'.$feuGT_options['general']['uploadFolder']['value']; //REQUIRED FOR VALID CHANGE
If for example we defined our FRONTEND UPLOAD – UPLOAD FOLDER Option in the backoffice to “/simple_uploads” the new upload directory will be:
This filter is usede right after an Ajax response of a successful upload. It’s useful in case you wish to add custom jquery after successful upload.
file – contains all information about the uploaded file
data – contains all data outputted
response – contains response about the uploaded file ( true or false )
return 'console.log("uploaded!"); console.log(file);';