From f2a1f5f11d72bbe1f327ccc299669cdc700aa58d Mon Sep 17 00:00:00 2001 From: saifsultanc Date: Tue, 22 Aug 2023 18:25:41 +0530 Subject: [PATCH] `gppa-encrypt-fileupload-field-links.php`: Added a snippet that encrypts file upload field links with GPPA. --- .../gppa-encrypt-fileupload-field-links.php | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 gp-populate-anything/gppa-encrypt-fileupload-field-links.php diff --git a/gp-populate-anything/gppa-encrypt-fileupload-field-links.php b/gp-populate-anything/gppa-encrypt-fileupload-field-links.php new file mode 100644 index 00000000..010f2497 --- /dev/null +++ b/gp-populate-anything/gppa-encrypt-fileupload-field-links.php @@ -0,0 +1,33 @@ + urlencode( $value ), + 'form-id' => $form['id'], + 'field-id' => $field['id'], + 'hash' => GFCommon::generate_download_hash( $form['id'], $field['id'], $value ), + ); + $download_url = add_query_arg( $args, $download_url ); + + return $download_url; + } + return $value; +}