Exemple #1
0
 private function export_settings()
 {
     $format = wpl_request::getVar('wpl_export_format', 'json');
     $output = wpl_settings::export_settings($format);
     if ($format == 'json') {
         header('Content-disposition: attachment; filename=settings.json');
         header('Content-type: application/json');
     } elseif ($format == 'xml') {
         header('Content-disposition: attachment; filename=settings.xml');
         header('Content-type: application/xml');
     }
     echo $output;
     exit;
 }