ngg_dlgallery_zip_filename

The NextGEN Download Gallery ngg dlgallery zip filename hook.

Description

apply_filters( 'ngg_dlgallery_zip_filename', (string) $sanitize_file_name, (unknown) $gallery ); 

Parameters (2)

0. $sanitize_file_name (string) => sanitize_file_name(strtr($gallery, ', ', '-')) . '.zip'
The sanitize file name.
1. $gallery (unknown)
The gallery.

Usage

To run the hook, copy the example below.
  1. $sanitize_file_name = apply_filters( 'ngg_dlgallery_zip_filename', $sanitize_file_name, $gallery ); 
  2.  
  3. if ( !empty( $sanitize_file_name ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the ngg_dlgallery_zip_filename callback 
  2. function filter_ngg_dlgallery_zip_filename( $sanitize_file_name, $gallery ) { 
  3. // make filter magic happen here... 
  4. return $sanitize_file_name
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'ngg_dlgallery_zip_filename', 'filter_ngg_dlgallery_zip_filename', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'ngg_dlgallery_zip_filename', 'filter_ngg_dlgallery_zip_filename', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/class.NextGENDownloadGallery.php  
  1. $zipName = apply_filters('ngg_dlgallery_zip_filename', sanitize_file_name(strtr($gallery, ', ', '-')) . '.zip', $gallery);