This is the official github repository of the ACF Dropzone plugin.
Add drag and drop upload to ACF File Field, Image field and Gallery field.
Requires at least WP 5.0 and ACF 5.6.
Enable the "Dropzone" option in the field settings.
Enjoy your new dropping experience!
Just follow the Automatic Plugin Installation procedere.
$ wp plugin install --activate acf-dropzone
composer require mcguffin/acf-dropzone
- cd into your plugin directory
- $
git clone git@github.com:mcguffin/acf-dropzone.git
- $
cd acf-dropzone
- $
npm install
- $
npm run dev
To add dropzone capability to arbitrary field types you can use the acf_dropzone/file_fields
and acf_dropzone/gallery_fields
filter.
This might come in handy if you use the feature image field type of ACF Frontend, or something alike.
Adding support for ACF Frontend‘s featured_image
field:
add_filter( 'acf_dropzone/file_fields', function($fields) {
$fields[] = 'featured_image';
return $fields;
});
Please note that the field input HTML needs to be exactly as the one provided by ACF, so filters won't work on any field.