/** * Use an ACF function to export field groups * @return null */ public function export() { // include ACF file needed for export acf_include("admin/settings-tools.php"); $tools = new \acf_settings_tools(); // create post variable for ACF function $_POST["acf_export_keys"] = $this->getFieldGroupNames(); $data = $tools->get_json(); $this->saveConfig($data); }