Conditional Fields for Contact Form 7 - Version 1.6.5

Version Description

(10-15-19) = * Patched a minor security issue. From now on, only users with the 'wpcf7_edit_contact_form' capability will be able to reset the Conditional Fields settings to their defaults. Big tThanks to Chloe from Wordfence for pointing this out! * Tested the plugin with WP version 5.2.4

Download this release

Release Info

Developer Jules Colle
Plugin Icon 128x128 Conditional Fields for Contact Form 7
Version 1.6.5
Comparing to
See all releases

Code changes from version 1.6.3 to 1.6.5

admin-style.css CHANGED
@@ -1,161 +1,249 @@
1
- #wpcf7cf-new-entry {
2
- display: inline-block;
3
- display: none; }
4
-
5
- #wpcf7cf-delete-button {
6
- display: none; }
7
-
8
- #wpcf7cf-settings-text {
9
- width: 100%;
10
- height: 280px;
11
- font-family: "Courier New", Courier, monospace; }
12
-
13
- #wpcf7cf-conditional-panel {
14
- overflow-x: auto; }
15
- #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .label, #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .field, #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .description {
16
- padding: 10px;
17
- display: inline-block;
18
- vertical-align: middle;
19
- width: 10%; }
20
- #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .field {
21
- width: 20%; }
22
- #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .description {
23
- width: 40%;
24
- vertical-align: top; }
25
- #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line {
26
- border-bottom: 1px solid #dddddd;
27
- background-color: #f9f9f9;
28
- padding: 0 10px; }
29
- #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line:nth-child(2n) {
30
- background-color: #e9e9e9; }
31
- #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line input, #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line select {
32
- width: 100%; }
33
- #wpcf7cf-conditional-panel .ui-autocomplete-term {
34
- font-weight: bold; }
35
- #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line > .label.editable {
36
- position: relative; }
37
- #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line > .label.editable input {
38
- background-color: transparent;
39
- border-width: 0;
40
- outline: none;
41
- box-shadow: none;
42
- padding: 0; }
43
- #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line > .label.editable input:after {
44
- content: "edit";
45
- display: block;
46
- width: 10px;
47
- right: 0;
48
- position: absolute; }
49
- #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line > .label.editable input:focus {
50
- background: #fff;
51
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
52
- border: 1px solid #ddd;
53
- padding: 2px; }
54
- #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line > .label.editable input:focus:after {
55
- content: ""; }
56
- #wpcf7cf-conditional-panel .wpcf7cf-and {
57
- display: inline-block; }
58
- #wpcf7cf-conditional-panel .wpcf7cf-and-rules, #wpcf7cf-conditional-panel .wpcf7cf-if {
59
- display: inline-block;
60
- vertical-align: top; }
61
- #wpcf7cf-conditional-panel #wpcf7cf-entries input, #wpcf7cf-conditional-panel #wpcf7cf-entries select, #wpcf7cf-conditional-panel .and-button, #wpcf7cf-conditional-panel .delete-button, #wpcf7cf-conditional-panel #wpcf7cf-entries .if-txt, #wpcf7cf-conditional-panel #wpcf7cf-entries .label, #wpcf7cf-conditional-panel #wpcf7cf-add-button {
62
- position: relative;
63
- display: inline-block;
64
- vertical-align: bottom;
65
- margin: 2px;
66
- padding: 3px;
67
- background: #fefefe;
68
- border: 1px solid #bababa;
69
- box-shadow: none;
70
- height: 22px;
71
- line-height: 22px;
72
- box-sizing: content-box; }
73
- #wpcf7cf-conditional-panel #wpcf7cf-entries .label {
74
- background-color: transparent;
75
- border: none; }
76
- #wpcf7cf-conditional-panel .and-button, #wpcf7cf-conditional-panel .delete-button, #wpcf7cf-conditional-panel #wpcf7cf-add-button {
77
- border: 1px solid #4ed521;
78
- color: #007b04;
79
- cursor: pointer;
80
- font-size: 11px;
81
- font-weight: bold;
82
- -webkit-touch-callout: none;
83
- /* iOS Safari */
84
- -webkit-user-select: none;
85
- /* Safari */
86
- -khtml-user-select: none;
87
- /* Konqueror HTML */
88
- -moz-user-select: none;
89
- /* Firefox */
90
- -ms-user-select: none;
91
- /* Internet Explorer/Edge */
92
- user-select: none;
93
- /* Non-prefixed version, currently */
94
- background-color: rgba(75, 169, 61, 0.11); }
95
- #wpcf7cf-conditional-panel #wpcf7cf-add-button {
96
- margin-top: 10px;
97
- text-align: center;
98
- padding-left: 20px;
99
- padding-right: 20px; }
100
- #wpcf7cf-conditional-panel .and-button:hover {
101
- background-color: rgba(75, 169, 61, 0.2); }
102
- #wpcf7cf-conditional-panel .delete-button {
103
- border: 1px solid #bababa;
104
- color: #858585;
105
- background-color: transparent;
106
- margin-left: 42px; }
107
- #wpcf7cf-conditional-panel .delete-button:hover {
108
- background-color: rgba(133, 133, 133, 0.11); }
109
- #wpcf7cf-conditional-panel .and-button {
110
- display: none;
111
- width: 30px;
112
- text-align: center; }
113
- #wpcf7cf-conditional-panel .wpcf7cf-and-rule:first-child .and-button {
114
- display: inline-block;
115
- vertical-align: top;
116
- height: 22px;
117
- position: absolute;
118
- line-height: 22px;
119
- right: 50px;
120
- top: 0; }
121
- #wpcf7cf-conditional-panel .wpcf7cf-and-rule {
122
- margin-bottom: 4px;
123
- height: 30px; }
124
- #wpcf7cf-conditional-panel .wpcf7cf-and-rule .if-txt, #wpcf7cf-conditional-panel .wpcf7cf-if > .label {
125
- cursor: n-resize; }
126
- #wpcf7cf-conditional-panel .wpcf7cf-and-rule .if-txt:before {
127
- content: 'and';
128
- position: absolute;
129
- width: 30px;
130
- text-align: right;
131
- left: -34px; }
132
- #wpcf7cf-conditional-panel .wpcf7cf-and-rule:first-child .if-txt:before {
133
- display: none; }
134
- #wpcf7cf-conditional-panel .wpcf7cf-inner-container {
135
- min-width: 800px; }
136
- #wpcf7cf-conditional-panel .entry {
137
- box-sizing: border-box;
138
- display: flex; }
139
- #wpcf7cf-conditional-panel .entry .wpcf7cf-if {
140
- width: 188px; }
141
- #wpcf7cf-conditional-panel .then-field-select {
142
- width: 130px; }
143
- #wpcf7cf-conditional-panel .entry .wpcf7cf-and-rules {
144
- flex: 1;
145
- position: relative; }
146
- #wpcf7cf-conditional-panel .wpcf7cf-and-rule {
147
- display: flex; }
148
- #wpcf7cf-conditional-panel .if-txt {
149
- width: 14px;
150
- text-align: center; }
151
- #wpcf7cf-conditional-panel .operator {
152
- /*width:140px;*/ }
153
- #wpcf7cf-conditional-panel .if-value {
154
- flex: 1;
155
- margin-right: 3px !important; }
156
-
157
- .wpcf7cf-list li {
158
- list-style: disc;
159
- margin-left: 20px; }
160
-
161
- /*# sourceMappingURL=admin-style.css.map */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #wpcf7cf-new-entry {
2
+ display: inline-block;
3
+ display: none;
4
+ }
5
+
6
+ #wpcf7cf-delete-button {
7
+ display: none;
8
+ }
9
+
10
+ #wpcf7cf-settings-text {
11
+ width: 100%;
12
+ height: 280px;
13
+ font-family: "Courier New", Courier, monospace;
14
+ }
15
+
16
+ #wpcf7cf-conditional-panel {
17
+ overflow-x: auto;
18
+ }
19
+
20
+ #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .label, #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .field, #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .description {
21
+ padding: 10px;
22
+ display: inline-block;
23
+ vertical-align: middle;
24
+ width: 10%;
25
+ }
26
+
27
+ #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .field {
28
+ width: 20%;
29
+ }
30
+
31
+ #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .description {
32
+ width: 40%;
33
+ vertical-align: top;
34
+ }
35
+
36
+ #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line {
37
+ border-bottom: 1px solid #dddddd;
38
+ background-color: #f9f9f9;
39
+ padding: 0 10px;
40
+ }
41
+
42
+ #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line:nth-child(2n) {
43
+ background-color: #e9e9e9;
44
+ }
45
+
46
+ #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line input, #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line select {
47
+ width: 100%;
48
+ }
49
+
50
+ #wpcf7cf-conditional-panel .ui-autocomplete-term {
51
+ font-weight: bold;
52
+ }
53
+
54
+ #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line > .label.editable {
55
+ position: relative;
56
+ }
57
+
58
+ #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line > .label.editable input {
59
+ background-color: transparent;
60
+ border-width: 0;
61
+ outline: none;
62
+ -webkit-box-shadow: none;
63
+ box-shadow: none;
64
+ padding: 0;
65
+ }
66
+
67
+ #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line > .label.editable input:after {
68
+ content: "edit";
69
+ display: block;
70
+ width: 10px;
71
+ right: 0;
72
+ position: absolute;
73
+ }
74
+
75
+ #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line > .label.editable input:focus {
76
+ background: #fff;
77
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
78
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
79
+ border: 1px solid #ddd;
80
+ padding: 2px;
81
+ }
82
+
83
+ #wpcf7cf-conditional-panel .wpcf7cf-admin-wrap .option-line > .label.editable input:focus:after {
84
+ content: "";
85
+ }
86
+
87
+ #wpcf7cf-conditional-panel .wpcf7cf-and {
88
+ display: inline-block;
89
+ }
90
+
91
+ #wpcf7cf-conditional-panel .wpcf7cf-and-rules, #wpcf7cf-conditional-panel .wpcf7cf-if {
92
+ display: inline-block;
93
+ vertical-align: top;
94
+ }
95
+
96
+ #wpcf7cf-conditional-panel #wpcf7cf-entries input, #wpcf7cf-conditional-panel #wpcf7cf-entries select, #wpcf7cf-conditional-panel .and-button, #wpcf7cf-conditional-panel .delete-button, #wpcf7cf-conditional-panel #wpcf7cf-entries .if-txt, #wpcf7cf-conditional-panel #wpcf7cf-entries .label, #wpcf7cf-conditional-panel #wpcf7cf-add-button {
97
+ position: relative;
98
+ display: inline-block;
99
+ vertical-align: bottom;
100
+ margin: 2px;
101
+ padding: 3px;
102
+ background: #fefefe;
103
+ border: 1px solid #bababa;
104
+ -webkit-box-shadow: none;
105
+ box-shadow: none;
106
+ height: 22px;
107
+ line-height: 22px;
108
+ -webkit-box-sizing: content-box;
109
+ box-sizing: content-box;
110
+ }
111
+
112
+ #wpcf7cf-conditional-panel #wpcf7cf-entries .label {
113
+ background-color: transparent;
114
+ border: none;
115
+ }
116
+
117
+ #wpcf7cf-conditional-panel .and-button, #wpcf7cf-conditional-panel .delete-button, #wpcf7cf-conditional-panel #wpcf7cf-add-button {
118
+ border: 1px solid #4ed521;
119
+ color: #007b04;
120
+ cursor: pointer;
121
+ font-size: 11px;
122
+ font-weight: bold;
123
+ -webkit-touch-callout: none;
124
+ /* iOS Safari */
125
+ -webkit-user-select: none;
126
+ /* Safari */
127
+ /* Konqueror HTML */
128
+ -moz-user-select: none;
129
+ /* Firefox */
130
+ -ms-user-select: none;
131
+ /* Internet Explorer/Edge */
132
+ user-select: none;
133
+ /* Non-prefixed version, currently */
134
+ background-color: rgba(75, 169, 61, 0.11);
135
+ }
136
+
137
+ #wpcf7cf-conditional-panel #wpcf7cf-add-button {
138
+ margin-top: 10px;
139
+ text-align: center;
140
+ padding-left: 20px;
141
+ padding-right: 20px;
142
+ }
143
+
144
+ #wpcf7cf-conditional-panel .and-button:hover {
145
+ background-color: rgba(75, 169, 61, 0.2);
146
+ }
147
+
148
+ #wpcf7cf-conditional-panel .delete-button {
149
+ border: 1px solid #bababa;
150
+ color: #858585;
151
+ background-color: transparent;
152
+ margin-left: 42px;
153
+ }
154
+
155
+ #wpcf7cf-conditional-panel .delete-button:hover {
156
+ background-color: rgba(133, 133, 133, 0.11);
157
+ }
158
+
159
+ #wpcf7cf-conditional-panel .and-button {
160
+ display: none;
161
+ width: 30px;
162
+ text-align: center;
163
+ }
164
+
165
+ #wpcf7cf-conditional-panel .wpcf7cf-and-rule:first-child .and-button {
166
+ display: inline-block;
167
+ vertical-align: top;
168
+ height: 22px;
169
+ position: absolute;
170
+ line-height: 22px;
171
+ right: 50px;
172
+ top: 0;
173
+ }
174
+
175
+ #wpcf7cf-conditional-panel .wpcf7cf-and-rule {
176
+ margin-bottom: 4px;
177
+ height: 30px;
178
+ }
179
+
180
+ #wpcf7cf-conditional-panel .wpcf7cf-and-rule .if-txt, #wpcf7cf-conditional-panel .wpcf7cf-if > .label {
181
+ cursor: n-resize;
182
+ }
183
+
184
+ #wpcf7cf-conditional-panel .wpcf7cf-and-rule .if-txt:before {
185
+ content: 'and';
186
+ position: absolute;
187
+ width: 30px;
188
+ text-align: right;
189
+ left: -34px;
190
+ }
191
+
192
+ #wpcf7cf-conditional-panel .wpcf7cf-and-rule:first-child .if-txt:before {
193
+ display: none;
194
+ }
195
+
196
+ #wpcf7cf-conditional-panel .wpcf7cf-inner-container {
197
+ min-width: 800px;
198
+ }
199
+
200
+ #wpcf7cf-conditional-panel .entry {
201
+ -webkit-box-sizing: border-box;
202
+ box-sizing: border-box;
203
+ display: -webkit-box;
204
+ display: -ms-flexbox;
205
+ display: flex;
206
+ }
207
+
208
+ #wpcf7cf-conditional-panel .entry .wpcf7cf-if {
209
+ width: 188px;
210
+ }
211
+
212
+ #wpcf7cf-conditional-panel .then-field-select {
213
+ width: 130px;
214
+ }
215
+
216
+ #wpcf7cf-conditional-panel .entry .wpcf7cf-and-rules {
217
+ -webkit-box-flex: 1;
218
+ -ms-flex: 1;
219
+ flex: 1;
220
+ position: relative;
221
+ }
222
+
223
+ #wpcf7cf-conditional-panel .wpcf7cf-and-rule {
224
+ display: -webkit-box;
225
+ display: -ms-flexbox;
226
+ display: flex;
227
+ }
228
+
229
+ #wpcf7cf-conditional-panel .if-txt {
230
+ width: 14px;
231
+ text-align: center;
232
+ }
233
+
234
+ #wpcf7cf-conditional-panel .operator {
235
+ /*width:140px;*/
236
+ }
237
+
238
+ #wpcf7cf-conditional-panel .if-value {
239
+ -webkit-box-flex: 1;
240
+ -ms-flex: 1;
241
+ flex: 1;
242
+ margin-right: 3px !important;
243
+ }
244
+
245
+ .wpcf7cf-list li {
246
+ list-style: disc;
247
+ margin-left: 20px;
248
+ }
249
+ /*# sourceMappingURL=admin-style.css.map */
admin-style.css.map CHANGED
@@ -1,7 +1,9 @@
1
- {
2
- "version": 3,
3
- "mappings": "AAAA,kBAAmB;EAAE,OAAO,EAAE,YAAY;EAAE,OAAO,EAAC,IAAI;;AACxD,sBAAuB;EAAE,OAAO,EAAE,IAAI;;AACtC,sBAAuB;EAAE,KAAK,EAAE,IAAI;EAAE,MAAM,EAAE,KAAK;EAAE,WAAW,EAAE,iCAAiC;;AAEnG,0BAA2B;EAoHvB,UAAU,EAAE,IAAI;EAlHhB,yKAAyF;IACrF,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,YAAY;IACrB,cAAc,EAAE,MAAM;IACtB,KAAK,EAAE,GAAG;EAEd,qDAA2B;IACvB,KAAK,EAAE,GAAG;EAEd,2DAAiC;IAC7B,KAAK,EAAE,GAAG;IACV,cAAc,EAAE,GAAG;EAIvB,2DAAiC;IAC7B,aAAa,EAAE,iBAAiB;IAChC,gBAAgB,EAAE,OAAO;IACzB,OAAO,EAAE,MAAM;EAGnB,yEAA+C;IAC3C,gBAAgB,EAAE,OAAO;EAG7B,qIAAgF;IAC5E,KAAK,EAAE,IAAI;EAGf,gDAAsB;IAClB,WAAW,EAAE,IAAI;EAGrB,6EAAmD;IAC/C,QAAQ,EAAE,QAAQ;EAGtB,mFAAyD;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sources": [
5
+ "admin-style.scss"
6
+ ],
7
+ "names": [],
8
+ "file": "admin-style.css"
9
  }
contact-form-7-conditional-fields.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Contact Form 7 Conditional Fields
4
  Plugin URI: http://bdwm.be/
5
  Description: Adds support for conditional fields to Contact Form 7. This plugin depends on Contact Form 7.
6
  Author: Jules Colle
7
- Version: 1.6.3
8
  Author URI: http://bdwm.be/
9
  */
10
 
4
  Plugin URI: http://bdwm.be/
5
  Description: Adds support for conditional fields to Contact Form 7. This plugin depends on Contact Form 7.
6
  Author: Jules Colle
7
+ Version: 1.6.5
8
  Author URI: http://bdwm.be/
9
  */
10
 
init.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '1.6.3' );
4
  if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
5
  if (!defined('WPCF7CF_PLUGIN')) define( 'WPCF7CF_PLUGIN', __FILE__ );
6
  if (!defined('WPCF7CF_PLUGIN_BASENAME')) define( 'WPCF7CF_PLUGIN_BASENAME', plugin_basename( WPCF7CF_PLUGIN ) );
1
  <?php
2
 
3
+ if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '1.6.5' );
4
  if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
5
  if (!defined('WPCF7CF_PLUGIN')) define( 'WPCF7CF_PLUGIN', __FILE__ );
6
  if (!defined('WPCF7CF_PLUGIN_BASENAME')) define( 'WPCF7CF_PLUGIN_BASENAME', plugin_basename( WPCF7CF_PLUGIN ) );
js/scripts.js CHANGED
@@ -34,7 +34,7 @@ function Wpcf7cfForm($form) {
34
  form.conditions = form_options['conditions'];
35
  form.settings = form_options['settings'];
36
 
37
- form.$groups = [];
38
  form.repeaters = [];
39
  form.multistep = null;
40
  form.fields = [];
34
  form.conditions = form_options['conditions'];
35
  form.settings = form_options['settings'];
36
 
37
+ form.$groups = jQuery(); // empty jQuery set
38
  form.repeaters = [];
39
  form.multistep = null;
40
  form.fields = [];
readme.txt CHANGED
@@ -5,8 +5,8 @@ Author: Jules Colle
5
  Website: http://bdwm.be
6
  Tags: wordpress, contact form 7, forms, conditional fields
7
  Requires at least: 4.1
8
- Tested up to: 5.2.2
9
- Stable tag: 1.6.3
10
  Requires PHP: 5.3
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -102,6 +102,14 @@ The conditional fields javascript code is loaded during wp_footer, so a call to
102
 
103
  == Changelog ==
104
 
 
 
 
 
 
 
 
 
105
  = 1.6.3 (07-04-19) =
106
  * Removed the word "Pro" from the title in the free plugin
107
 
5
  Website: http://bdwm.be
6
  Tags: wordpress, contact form 7, forms, conditional fields
7
  Requires at least: 4.1
8
+ Tested up to: 5.2.4
9
+ Stable tag: 1.6.5
10
  Requires PHP: 5.3
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
102
 
103
  == Changelog ==
104
 
105
+ = 1.6.5 (10-15-19) =
106
+ * Patched a minor security issue. From now on, only users with the 'wpcf7_edit_contact_form' capability will be able to reset the Conditional Fields settings to their defaults. Big tThanks to Chloe from Wordfence for pointing this out!
107
+ * Tested the plugin with WP version 5.2.4
108
+
109
+ = 1.6.4 (07-04-19) =
110
+ * PRO: Repeater: Fixed invalid HTML for the remove button
111
+ * Free: Initialize form.$groups as a new jQuery object instead of an empty array, in order to prevent exotic bugs in case $groups aren't loaded by the time form.displayFields() is called. (https://wordpress.org/support/topic/typeerror-cannot-read-property-addclass-of-undefined-at-wpcf7cfform/)
112
+
113
  = 1.6.3 (07-04-19) =
114
  * Removed the word "Pro" from the title in the free plugin
115
 
wpcf7cf-options.php CHANGED
@@ -29,10 +29,6 @@ if (!is_array($wpcf7cf_options)) {
29
  update_option(WPCF7CF_OPTIONS, $wpcf7cf_options);
30
  }
31
 
32
- if(isset($_POST['reset'])) {
33
- update_option(WPCF7CF_OPTIONS, $wpcf7cf_default_options);
34
- $wpcf7cf_options['wpcf7cf_settings_saved'] = 0;
35
- }
36
 
37
  // this setting will only be 0 as long as the user has not saved any settings. Once the user has saved the WPCF7CF settings, this value will always remain 1.
38
  if (!key_exists('wpcf7cf_settings_saved',$wpcf7cf_options)) $wpcf7cf_options['wpcf7cf_settings_saved'] = 0;
@@ -318,6 +314,13 @@ function wpcf7cf_regex_collection() {
318
 
319
  add_action('admin_init', 'wpcf7cf_admin_init');
320
  function wpcf7cf_admin_init(){
 
 
 
 
 
 
 
321
  register_setting( WPCF7CF_OPTIONS, WPCF7CF_OPTIONS, 'wpcf7cf_options_sanitize' );
322
  }
323
 
29
  update_option(WPCF7CF_OPTIONS, $wpcf7cf_options);
30
  }
31
 
 
 
 
 
32
 
33
  // this setting will only be 0 as long as the user has not saved any settings. Once the user has saved the WPCF7CF settings, this value will always remain 1.
34
  if (!key_exists('wpcf7cf_settings_saved',$wpcf7cf_options)) $wpcf7cf_options['wpcf7cf_settings_saved'] = 0;
314
 
315
  add_action('admin_init', 'wpcf7cf_admin_init');
316
  function wpcf7cf_admin_init(){
317
+ global $wpcf7cf_default_options;
318
+
319
+ if(isset($_POST['reset']) && current_user_can( 'wpcf7_edit_contact_form' ) ) {
320
+ update_option(WPCF7CF_OPTIONS, $wpcf7cf_default_options);
321
+ $wpcf7cf_options['wpcf7cf_settings_saved'] = 0;
322
+ }
323
+
324
  register_setting( WPCF7CF_OPTIONS, WPCF7CF_OPTIONS, 'wpcf7cf_options_sanitize' );
325
  }
326