I hereby claim:
- I am davewardle on github.
- I am davewardle (https://keybase.io/davewardle) on keybase.
- I have a public key ASCHPjeZZbvwtztpwSJM5vdQuzhbUdV1Ca2cSjrGktF6tgo
To claim this, I am signing this object:
<?php | |
add_filter( 'template', 'switch_to_new_theme' ); | |
add_filter( 'stylesheet', 'switch_to_new_theme' ); | |
function switch_to_new_theme( $template ) { | |
$request = $GLOBALS['_SERVER']['REQUEST_URI']; | |
if ( |
<?php | |
// simple spam protection - drop any submissions where email is in a blacklist | |
// note: this function assumes that form has honeypot field enabled. | |
function pre_validation_handler( $form ) { | |
// blacklist is an array of bad email addresses or spam phrases | |
// for now, just a single (real) spammer | |
$blacklist = [ 'atouchofawesomeness@gmail.com' ]; | |
<?php | |
function default_gravity_forms_retention_policy( $form, $is_new ) { | |
if ( $is_new ) { | |
$form['personalData']['preventIP'] = true; | |
$form['personalData']['retention'] = [ | |
'policy' => 'delete', | |
'retain_entries_days' => 45 | |
]; | |
GFAPI::update_form( $form ); | |
} |
<?php | |
function enforce_gravity_forms_retention_policy() { | |
// only load for admin panel | |
if ( is_admin() && class_exists( 'GFForms' ) ) { | |
// load all forms | |
$forms = GFAPI::get_forms(); | |
// loop through each form | |
foreach ( $forms as $form ) { |
I hereby claim:
To claim this, I am signing this object: