You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -50,6 +52,11 @@ class GFEmailFilteringAddOn extends GFAddOn
50
52
51
53
privatestatic$_instance = null;
52
54
55
+
public$denylist = [];
56
+
public$settings = [];
57
+
public$denylist_tooltip = 'Using one entry per line, enter a list of domains or email addresses to filter. You may also include wildcard notations to block top-level domains (e.g., *.ru).';
58
+
public$validation_tooltip = 'Please enter a default error message if a denied email is submitted. ';
59
+
53
60
/**
54
61
* Get an instance of this class.
55
62
*/
@@ -62,12 +69,23 @@ public static function get_instance(): GFEmailFilteringAddOn
62
69
returnself::$_instance;
63
70
}
64
71
72
+
/**
73
+
* Add tasks or filters here that you want to perform both in the backend and frontend and for ajax requests
'tooltip' => __('Please enter a list of domains (e.g., hotmail.com) or email addresses (e.g., [email protected]) to filter. You may include wildcard notations to filter top-level domains (e.g., *.cn). This setting can be overridden on individual email fields in the advanced settings.', 'gf-email-filtering-addon'),
118
+
'tooltip' => __("{$this->denylist_tooltip}This setting can be overridden on individual email fields in the advanced settings.", 'gf-email-filtering-addon'),
'tooltip' => __('Please enter a default error message if a denied email is submitted. This setting can be overridden on individual email fields in the advanced settings.', 'gf-email-filtering-addon'),
126
+
'tooltip' => __("{$this->validation_tooltip}This setting can be overridden on individual email fields in the advanced settings.", 'gf-email-filtering-addon'),
107
127
'class' => 'medium',
108
128
],
109
129
],
@@ -125,28 +145,27 @@ public function gform_field_advanced_settings(int $position, ?int $form_id = nul
125
145
}
126
146
127
147
// Get settings for placeholder text.
128
-
if (get_option('gravityformsaddon_' . $this->_slug . '_settings')) {
$tooltips['form_field_email_filtering'] = __("Please enter a comma-separated list of domains to filter (e.g., hotmail.com) or email addresses (e.g., [email protected]). You may also include the wildcard notations to block top-level domains (e.g., *.ru). This will override the globally-defined email filters. Enter 'none' to bypass the global setting and allow all email addresses.", 'gf-email-filtering-addon');
167
-
$tooltips['form_field_email_filtering_validation'] = __('Please enter an error message if a filtered email is submitted. This will override the globally-defined error message.', 'gf-email-filtering-addon');
185
+
$tooltips['form_field_email_filtering'] = __("{$this->denylist_tooltip} This will override the globally-defined email filters. Enter 'none' to bypass the global setting and allow all email addresses.", 'gf-email-filtering-addon');
186
+
$tooltips['form_field_email_filtering_validation'] = __("{$this->validation_tooltip}This will override the globally-defined error message.", 'gf-email-filtering-addon');
168
187
return$tooltips;
169
188
}
170
189
@@ -196,13 +215,7 @@ public function gform_editor_js(): void
0 commit comments