-
Notifications
You must be signed in to change notification settings - Fork 41
GDPR Update #2224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
GDPR Update #2224
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
e0f2132
gdpr update
Liviu-p c7d1bbb
Merge branch 'master' into feature/gdpr
Liviu-p aecccaf
gdpr field
Liviu-p f2b8f1e
Merge branch 'master' into feature/gdpr
Liviu-p 7114a76
merge master
Liviu-p 2f7c17a
Remove empty Other section with nothing in it
Crabcyborg c191474
copy fixes
Liviu-p 7be4e86
gdpr revisions update
Liviu-p 5bf42a9
Merge branch 'feature/gdpr' of github.com:Strategy11/formidable-forms…
Liviu-p ea4c59a
revisions update + QA issues fixes
Liviu-p 35612b2
fix showing gdpr field label when disabled for regular users, add gdp…
Liviu-p 6233e8a
fix unit test when a default_value is not set
Liviu-p adce765
Merge branch 'master' into feature/gdpr
Crabcyborg 93ddc1d
show the GDPR option if the old value of no_ips is enabled
Liviu-p e9c4deb
Merge branch 'feature/gdpr' of github.com:Strategy11/formidable-forms…
Liviu-p a01b162
Merge branch 'master' into feature/gdpr
Crabcyborg 4442e68
revisions update
Liviu-p 868501f
remove pointer-events from disabled option from gdpr related options
Liviu-p 53aa165
Merge branch 'feature/gdpr' of github.com:Strategy11/formidable-forms…
Liviu-p File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| <?php | ||
| /** | ||
| * GDPR field helper | ||
| * | ||
| * @since x.x | ||
| * @package Formidable | ||
| */ | ||
|
|
||
| if ( ! defined( 'ABSPATH' ) ) { | ||
| die( 'You are not allowed to call this page directly.' ); | ||
| } | ||
|
|
||
| /** | ||
| * Class FrmFieldGdprHelper | ||
| */ | ||
| class FrmFieldGdprHelper { | ||
|
|
||
| /** | ||
| * Field type | ||
| * | ||
| * @since x.x | ||
| * @var string | ||
| */ | ||
| const FIELD_TYPE = 'gdpr'; | ||
|
|
||
| /** | ||
| * Field class | ||
| * | ||
| * @since x.x | ||
| * @var string | ||
| */ | ||
| const FIELD_CLASS = 'FrmFieldGdpr'; | ||
|
|
||
| /** | ||
| * Hide GDPR field | ||
| * | ||
| * @since x.x | ||
| * @return bool | ||
| */ | ||
| public static function hide_gdpr_field() { | ||
| $settings = FrmAppHelper::get_settings(); | ||
| return ! $settings->enable_gdpr; | ||
| } | ||
|
|
||
| /** | ||
| * Add GDPR field to form builder | ||
| * | ||
| * @since x.x | ||
| * @param array $fields | ||
| * @return array | ||
| */ | ||
| public static function add_gdpr_field( $fields ) { | ||
| $fields[ self::FIELD_TYPE ] = array( | ||
| 'name' => __( 'GDPR', 'formidable' ), | ||
| 'icon' => 'frm_icon_font frm-gdpr-icon', | ||
| ); | ||
| return $fields; | ||
| } | ||
|
|
||
| /** | ||
| * Initialize GDPR field Class name | ||
| * | ||
| * @since x.x | ||
| * @param string $field_type | ||
| * @return string | ||
| */ | ||
| public static function get_gdpr_field_class( $field_type = '' ) { | ||
| if ( self::FIELD_TYPE === $field_type ) { | ||
| return self::FIELD_CLASS; | ||
| } | ||
| return ''; | ||
| } | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.