This file contains hidden or 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 | |
/** | |
* WARNING! THIS SNIPPET MAY BE OUTDATED. | |
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library: | |
* https://github.com/gravitywiz/snippet-library/blob/master/gp-easy-passthrough/gpep-edit-entry.php | |
*/ | |
/** | |
* Gravity Perks // Easy Passthrough // Edit Entry | |
* | |
* Edit entry ID specified in field with current form submission. |
This file contains hidden or 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
private function disable_gform_after_submission_hooks( $form_id ) { | |
global $wp_filter, $wp_actions; | |
$tag = 'gform_after_submission'; | |
if ( ! isset( $this->_wp_filters[ $tag ] ) ) { | |
if ( isset( $wp_filter[ $tag ] ) ) { | |
$this->_wp_filters[ $tag ] = $wp_filter[ $tag ]; | |
unset( $wp_filter[ $tag ] ); | |
} | |
} | |
$tag = "gform_after_submission_{$form_id}"; |
This file contains hidden or 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 | |
// Update "123" to your child form ID and "4" to the child File Upload field ID. | |
add_filter( 'gpnf_display_value_123_4', function( $value, $field, $form, $entry ) { | |
$value['label'] = sprintf( '<img src="%s">', $value['value'] ); | |
return $value; | |
}, 10, 4 ); |
This file contains hidden or 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 | |
/** | |
* Hack to process payment when returning to site from PayPal. | |
* http://gravitywiz.com/ | |
* | |
* WARNING: This should only be used when testing on local sites. | |
*/ | |
add_action( 'init', function() { | |
function gw_intercept_ipn_verification() { |
This file contains hidden or 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 | |
/** | |
* Gravity Wiz // Gravity Forms // Map GF Checkbox Field to ACF Checkbox Field (User Meta) | |
* http://graivtywiz.com/ | |
*/ | |
add_filter( 'gform_user_registration_meta_value', function( $value, $meta_key ) { | |
// Update "checkboxes" to your custom field's name. | |
if( $meta_key === 'checkboxes' ) { | |
$value = array_map( 'trim', explode( ',', $value ) ); | |
} |
This file contains hidden or 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 | |
/** | |
* WARNING! THIS SNIPPET MAY BE OUTDATED. | |
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library: | |
* https://github.com/gravitywiz/snippet-library/blob/master/gp-nested-forms/gp-nested-forms-auto-attach-child-files.php | |
*/ | |
/** | |
* Gravity Perks // Nested Forms // Auto-attach Uploaded Files from Child to Parent Notifications | |
* http://gravitywiz.com/documentation/gravity-forms-nested-forms/ | |
*/ |
This file contains hidden or 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 | |
/** | |
* Gravity Wiz // Gravity Forms // Daily Form Schedule | |
* | |
* Allow your form schedule to apply daily. | |
* | |
* @version 1.3 | |
* @author David Smith <[email protected]> | |
* @license GPL-2.0+ | |
* @link http://gravitywiz.com/ |
This file contains hidden or 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 | |
/** | |
* Gravity Perks // GP Limit Submissions // Apply Limit Collectively to Group of Forms | |
* http://gravitywiz.com/documentation/gravity-forms-limit-submissions/ | |
*/ | |
add_filter( 'gpls_rule_groups', function( $rule_groups, $form_id ) { | |
// Update "123" to the ID of the form that will share its feeds with the other forms. | |
$primary_form_id = 123; |