Last active
May 25, 2018 18:15
-
-
Save Shelob9/f1e2aaf901d602ec299ac455418588b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Change the data exporter and eraser for one Caldera Form | |
* | |
* #GPDR | |
*/ | |
add_filter( 'caldera_forms_gdpr_callback', | |
function($defualt_callback, $type, $form_id ){ | |
//IMPORTANT: Change form ID or remove conditional to change for all forms | |
if ( 'CF12345' === $form_id ) { | |
switch ($type){ | |
case 'exporter': | |
//Callable reference to function that will process the export request for this form. | |
return 'my_caldera_forms_gdpr_exporter'; | |
break; | |
case 'eraser': | |
default: | |
//Callable reference to function that will process the eraser request for this form. | |
return 'my_caldera_forms_gdpr_eraser'; | |
break; | |
} | |
} | |
//Return default unmodified if conditions not met. | |
return $defualt_callback; | |
}, | |
10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment