skipv1_0_0download_export_values

Exporting values in a file as download.

Description

skip\v1_0_0\download_export_values( $option_groups, (string) $file_name = 'export.skp' ); 

Parameters (2)

0. $option_groups
The option groups.
1. $file_name — Optional. (string) => 'export.skp'
The file name.

Usage

  1. if ( !function_exists( 'skip\v1_0_0\download_export_values' ) ) { 
  2. require_once '/includes/skip/elements/forms/export.php'; 
  3.  
  4. // The option groups. 
  5. $option_groups = null; 
  6.  
  7. // The file name. 
  8. $file_name = 'export.skp'; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = skip\v1_0_0\download_export_values($option_groups, $file_name); 
  12.  

Defined (1)

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

/includes/skip/elements/forms/export.php  
  1. function download_export_values( $option_groups, $file_name = 'export.skp' ) { 
  2. header("Content-Type: text/plain"); 
  3. header('Content-Disposition: attachment; filename="' . $file_name . '"'); 
  4. header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 
  5.  
  6. echo export_values( $option_groups ); 
  7.  
  8. exit;