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/44b56ec31831ac414b25db13bbbbd443 to your computer and use it in GitHub Desktop.
Save spivurno/44b56ec31831ac414b25db13bbbbd443 to your computer and use it in GitHub Desktop.
Gravity Perks // GP Post Content Merge Tags // Get Confirmation URL for Current User
<?php
/**
* Gravity Perks // GP Post Content Merge Tags // Get Confirmation URL for Current User
* http://gravitywiz.com/documentation/gravity-forms-post-content-merge-tags/
*/
function gppcm_get_confirmation_url_for_current_user( $form_id ) {
$entries = GFAPI::get_entries( $form_id, array( 'field_filters' => array( 'created_by' => get_current_user_id() ) ) );
$url = gform_get_meta( $entries[0]['id'], 'gppcmt_url' );
return $url;
}
// Example of how this function would be called.
gppcm_get_confirmation_url_for_current_user( 123 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment