ACF Gallery Zipper WP Registry grade C-. High-severity findings · 1 findingWP RegistryHigh-severity findings · 1 findingOpen the reportC-
Plugin creates a REST endpoint for zipping an ACF gallery field contents.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/bond-agency/acf-gallery-zipper/archive/refs/heads/master.zipWordPress plugin for zipping ACF Gallery field contents.
Requirements
This plugin assumes that you have ACF installed.
Installation
Download the zip and install the plugin. Use the hooks to define the post type and field you want to zip.
Usage
The plugin creates a REST endpoint for downloading zip files from the given post. You can get the ACF gallery field contents as zip by accessing that url:
<your-website-url>/wp-json/acf-gallery-zipper/v1/zip/<post-id>
Filters & Actions API
The plugin provides a simple API for interacting with the plugin via WordPress hooks.
Filters
acf_gallery_zipper_post_type
Use this filter to change the default post type. Default: post.
Example:
add_filter( 'acf_gallery_zipper_post_type', 'acf_gallery_zipper_change_default_post_type' );
function acf_gallery_zipper_change_default_post_type( $post_type ) {
return 'my-new-post-type';
}
acf_gallery_zipper_field_name
Use this filter to change the default field name that the plugin uses for zipping. Default: gallery.
Example:
add_filter( 'acf_gallery_zipper_field_name', 'acf_gallery_zipper_change_default_field_name' );
function acf_gallery_zipper_change_default_field_name( $field_name ) {
return 'my_gallery_field_name';
}
acf_gallery_zipper_filename
Use this filter to change the zip filename. Default: <post slug>.
Example:
add_filter( 'acf_gallery_zipper_filename', 'acf_gallery_zipper_change_default_filename' );
function acf_gallery_zipper_change_default_filename( $filename ) {
return $filename . '-suffix'; // .zip will be added automatically.
}
acf_gallery_zipper_use_cache
Use this filter to change the cache usage. By default the zip files are not stored anywhere but deleted right after they are sent to the user. Default: false.
Example:
add_filter( 'acf_gallery_zipper_use_cache', 'acf_gallery_zipper_change_default_use_cache' );
function acf_gallery_zipper_change_default_use_cache( $use_cache ) {
return true;
}
acf_gallery_zipper_removal_recurrence
Use this filter to change the cache removal recurrence. Default: daily. Possible values: hourly, twicedaily and daily.
Example:
add_filter( 'acf_gallery_zipper_removal_recurrence', 'acf_gallery_zipper_removal_change_default_recurrence' );
function acf_gallery_zipper_removal_recurrence( $recurrence ) {
return 'hourly';
}
Contributing
We are open for suggestions so open an issue if you have any feature requests or bug reports. Please do not create a pull request without creating related issue first.
Releases
3 releases.
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.