Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spivurno/bdef12619c0900858d67 to your computer and use it in GitHub Desktop.
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
<?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