The problem is that we are using php 5.2,
Can you support php 5.2 (minimum requisite for wordpress)? In this case I had to change your cf7AdbExportController code to no use anonymous functions:
Modifying cf7_adb.class.php :
function empty_function () {
}
function add_header_function() {
$id= $_GET['id'];
$filename = "contact_form_advanced_database_" . date('Ymd') . ".csv";
header("Content-Disposition: attachment; filename=\"$filename\"");
header("Content-Type: application/vnd.ms-excel");
require_once('display/export.php');
exit;
}
function cf7AdbExportController() {
// filename for download\
// $hook = add_submenu_page(null, '', '', 'administrator', 'cf7-adb-export-xls', function(){});
$hook = add_submenu_page(null, '', '', 'administrator', 'cf7-adb-export-xls', 'empty_function');
add_action('load-' . $hook, 'add_header_function' );
}
Thank you very much