export_wp_filename

Filters the export filename.

Description

apply_filters( 'export_wp_filename', (string) $wp_filename, (string) $sitename, (string) $date ); 

Parameters (3)

0. $wp_filename (string)
The name of the file for download.
1. $sitename (string)
The site name.
2. $date (string)
Today's date, formatted.

Usage

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

Defined (1)

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

/wp-admin/includes/export.php  
  1. $filename = apply_filters( 'export_wp_filename', $wp_filename, $sitename, $date );