Last active
April 19, 2017 15:56
-
-
Save spivurno/bdef12619c0900858d67 to your computer and use it in GitHub Desktop.
Gravity Perks // GP Unique ID // Merge Tag Support for Prefix and Suffix Settings
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 | |
/** | |
* Gravity Perks // GP Unique ID // Merge Tag Support for Prefix and Suffix Settings | |
* https://gravitywiz.com/documentation/gp-unique-id/ | |
* | |
* DEPRECATED! This snippet is no longer required. Merge tags are automatically supported with GP Unique ID v1.3. | |
*/ | |
add_filter( 'gpui_unique_id', 'gw_unique_id_replace_merge_tags', 10, 2 ); | |
function gw_unique_id_replace_merge_tags( $unique, $form_id ) { | |
return GFCommon::replace_variables( $unique, GFAPI::get_form( $form_id ), GFFormsModel::get_current_lead(), false, true, false, 'text' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment