Skip to content

Instantly share code, notes, and snippets.

David Smith spivurno

Block or report user

Report or block spivurno

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@spivurno
spivurno / gw-gravity-forms-daily-form-schedule.php
Last active Sep 30, 2019
Gravity Wiz // Gravity Forms // Daily Form Schedule
View gw-gravity-forms-daily-form-schedule.php
<?php
/**
* Gravity Wiz // Gravity Forms // Daily Form Schedule
*
* Allow your form schedule to apply daily.
*
* @version 1.0
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
* @link http://gravitywiz.com/
View gw-gravity-forms-feed-specific-submit-button.php
<?php
/**
* Gravity Wiz // Gravity Forms // Feed-specific Submit Button
*
* Change the label of the submit button depending on which payment feed will be used to process the order. This can help
* set user expectation when conditionally redirecting to Stripe Checkout. Currently, this plugin is limited to Stripe.
*
* @version 1.1
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
View gp-limit-submissions-apply-limit-collectively.php
<?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;
View gp-multi-page-navigation-add-current-class-custom-page-links.php
View gp-populate-anything-merge-tags-in-templates.php
<?php
/**
* Gravity Perks // Populate Anything // Use Standard Merge Tags in Choice/Value Templates
* http://gravitywiz.com/documentation/gravity-forms-populate-anything/
*/
add_filter( 'gppa_process_template', function( $template_value, $field, $template, $populate, $object, $object_type, $objects ) {
return GFCommon::replace_variables( $template_value, GFAPI::get_form( $object->form_id ), (array) $object );
}, 10, 7 );
View gp-nested-forms-clear-session-cookie-on-save-and-continue.php
View gp-populate-anything-set-post-taxonomy-terms.php
<?php
/**
* Gravity Perks // Populate Anything // Set Post Taxonomy Terms
* http://gravitywiz.com/documentation/gravity-forms-populate-anything/
*/
add_filter( 'gform_after_create_post', function( $post_id, $entry, $form ) {
foreach( $form['fields'] as &$field ) {
if( is_callable( 'gp_populate_anything' ) && $field->{'gppa-choices-enabled'} && $field->{'gppa-choices-object-type'} == 'term' ) {
$value = gp_populate_anything()->get_field_value( $form, $entry, $field->id );
@spivurno
spivurno / gp-limit-submissions-apply-same-feed-to-group.php
Last active Apr 5, 2019
Gravity Perks // GP Limit Submissions // Apply Limit Feed to Group of Forms
View gp-limit-submissions-apply-same-feed-to-group.php
<?php
/**
* Gravity Perks // GP Limit Submissions // Apply Limit Feed 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 your form.
$primary_form_id = 123;
View gp-limit-choices-gf-real-time-validation.php
<?php
/**
* Gravity Perks // Limit Choices // Fix Conflict with GF Real Time Validation
* http://gravitywiz.com/documentation/gravity-forms-limit-choices/
*/
if( class_exists( 'Gravity_Forms_Live_Validation' ) ) {
$gf_live_validation = Gravity_Forms_Live_Validation::get_instance();
remove_filter( 'gform_pre_render', array( $gf_live_validation, 'lv_apply_validations_to_form' ) );
add_filter( 'gform_pre_render', array( $gf_live_validation, 'lv_apply_validations_to_form' ), 11 );
}
View gp-populate-anything-user-role.php
<?php
/**
* Gravity Perks // Populate Anything // Populate User Role
* http://gravitywiz.com/documentation/gravity-forms-populate-anything/
*/
add_filter( 'gppa_process_template', function( $value, $field, $template, $populate, $object, $object_type, $objects ) {
if( $template == 'role' && is_a( $object, 'WP_User' ) ) {
$value = implode( ', ', $object->roles );
}
return $value;
You can’t perform that action at this time.