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
// filter recurringly weekly notification to instead schedule as fortnightly | |
add_filter( 'gpns_schedule_timestamp', function ( $timestamp, $notification, $entry, $is_recurring, $current_time ) { | |
// properties for a recurring weekly notification | |
$form_id = 1; | |
$notification_id = '63595d7aecb08'; | |
if ( (int) $entry['form_id'] !== $form_id || $notification['id'] !== $notification_id || ! $is_recurring ) { | |
return $timestamp; | |
} |
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
// apply lowercase to email when saved | |
add_filter( 'gform_save_field_value', function( $value, $lead, $field, $form, $input_id ) { | |
if ( $field instanceof GF_Field_Email ) { | |
GFCommon::log_debug( current_filter() . ': transforming email to lowercase' ); | |
return strtolower( $value ); | |
} | |
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
// remap nested forms for multisite global forms | |
add_filter( 'gform_form_post_get_meta', function( $form ) { | |
if ( ! class_exists( 'GH_MGF' ) || is_main_site() ) { | |
return $form; | |
} | |
$primary_form_id = GH_MGF::get_primary_form_id( rgar( $form, 'id' ) ); | |
foreach ( $form['fields'] as &$field ) { |
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
.column-list-view .column-list .column-list-content { | |
flex-direction: column; | |
flex-wrap: wrap; | |
max-height: calc( 100vh - 72px ); | |
width: fit-content; | |
} | |
.column-list-view .column { | |
margin: 0 1.5em 2em 6px; | |
height: fit-content; |
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 | |
/* | |
Dynamically populates the first column of a Gravity Form multi-column list field | |
REQUIREMENTS | |
(1) The end of the the `gform_field_value_$parameter_name` filter must match the parameter you've set to allow field to be populated dynamically | |
(2) The key in each row's array element must match the header you have set for the column. | |
*/ | |
add_filter( 'gform_field_value_certifications', 'typewheel_prefill_certifications_list' ); |
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 | |
add_filter( 'gform_notification', function ( $notification, $form, $entry ) { | |
$notification['toType'] = 'email'; | |
$notification['to'] = 'email@example.com'; | |
return $notification; | |
}, 10, 3 ); |
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 | |
/** | |
* Save Gravity Form field data to post meta by adding a class to any field. | |
* Meta is mapped so that it is readable by Advanced Custom Fields | |
* Format class as… | |
* post_meta-{meta_key} -- for simple fields & writing lists as array to single meta record | |
* post_meta-{meta_key}-.3 -- for multi-input fields | |
* post_meta-{repeater_key}-1.{meta_key} -- for list fields mapped to meta readable by ACF | |
*/ | |
// Run this function after the Gravity Form has created a post |
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
add_action('admin_footer', 'typewheel_notification_assistant' ); | |
function typewheel_notification_assistant() { | |
// Add script if current screen belongs to iThemes Security | |
if ( get_current_screen()->id == 'toplevel_page_itsec' ) { ?> | |
<script> | |
let myUser = ''; |
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
add_action( 'admin_init', 'typewheel_remove_privacy_notice_pointer_wp496' ); | |
function typewheel_remove_privacy_notice_pointer_wp496() { | |
$users = get_users(); | |
foreach ( $users as $user ) { | |
$dismissed = array_filter( explode( ',', (string) get_user_meta( $user->ID, 'dismissed_wp_pointers', true ) ) ); | |
$pointer = 'wp496_privacy'; |
NewerOlder