Contact Form & SMTP Plugin for WordPress by PirateForms - Version 2.0.4

Version Description

  • 2017-08-14
Download this release

Release Info

Developer codeinwp
Plugin Icon 128x128 Contact Form & SMTP Plugin for WordPress by PirateForms
Version 2.0.4
Comparing to
See all releases

Code changes from version 2.0.3 to 2.0.4

CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
 
 
 
 
 
 
 
2
  ### v2.0.3 - 2017-08-10
3
  **Changes:**
4
  * Fixed fatal errors on some environments because of anonymous functions usage.
1
 
2
+ ### v2.0.4 - 2017-08-14
3
+ **Changes:**
4
+ * All fields are now optional.
5
+ * Fixed redirect after form submission.
6
+ * Added more flexibility for changing the layout via dynamic CSS classes.
7
+
8
  ### v2.0.3 - 2017-08-10
9
  **Changes:**
10
  * Fixed fatal errors on some environments because of anonymous functions usage.
admin/class-pirateforms-admin.php CHANGED
@@ -311,7 +311,7 @@ class PirateForms_Admin {
311
  'id' => 'pirateformsopt_thank_you_url',
312
  'type' => 'select',
313
  'label' => array(
314
- 'value' => __( '"Thank You" Page', 'pirate-forms' ),
315
  'html' => '<span class="dashicons dashicons-editor-help"></span>',
316
  'desc' => array(
317
  'value' => __( 'Select the page that displays after a successful form submission. The page will be displayed without pausing on the email form, so please be sure to configure a relevant thank you message in this page.', 'pirate-forms' ),
@@ -338,11 +338,6 @@ class PirateForms_Admin {
338
  'type' => 'select',
339
  'label' => array(
340
  'value' => __( 'Name', 'pirate-forms' ),
341
- 'html' => '<span class="dashicons dashicons-editor-help"></span>',
342
- 'desc' => array(
343
- 'value' => __( 'Do you want the name field to be displayed?', 'pirate-forms' ),
344
- 'class' => 'pirate_forms_option_description',
345
- ),
346
  ),
347
  'default' => 'req',
348
  'value' => PirateForms_Util::get_option( 'pirateformsopt_name_field' ),
@@ -351,8 +346,8 @@ class PirateForms_Admin {
351
  'class' => 'pirate-forms-grouped',
352
  ),
353
  'options' => array(
354
- '' => __( 'No', 'pirate-forms' ),
355
- 'yes' => __( 'Yes but not required', 'pirate-forms' ),
356
  'req' => __( 'Required', 'pirate-forms' ),
357
  ),
358
  ),
@@ -362,11 +357,6 @@ class PirateForms_Admin {
362
  'type' => 'select',
363
  'label' => array(
364
  'value' => __( 'Email address', 'pirate-forms' ),
365
- 'html' => '<span class="dashicons dashicons-editor-help"></span>',
366
- 'desc' => array(
367
- 'value' => __( 'Do you want the email address field be displayed?', 'pirate-forms' ),
368
- 'class' => 'pirate_forms_option_description',
369
- ),
370
  ),
371
  'default' => 'req',
372
  'value' => PirateForms_Util::get_option( 'pirateformsopt_email_field' ),
@@ -375,7 +365,8 @@ class PirateForms_Admin {
375
  'class' => 'pirate-forms-grouped',
376
  ),
377
  'options' => array(
378
- 'yes' => __( 'Yes but not required', 'pirate-forms' ),
 
379
  'req' => __( 'Required', 'pirate-forms' ),
380
  ),
381
  ),
@@ -385,11 +376,6 @@ class PirateForms_Admin {
385
  'type' => 'select',
386
  'label' => array(
387
  'value' => __( 'Subject', 'pirate-forms' ),
388
- 'html' => '<span class="dashicons dashicons-editor-help"></span>',
389
- 'desc' => array(
390
- 'value' => __( 'Do you want the subject field be displayed?', 'pirate-forms' ),
391
- 'class' => 'pirate_forms_option_description',
392
- ),
393
  ),
394
  'default' => 'req',
395
  'value' => PirateForms_Util::get_option( 'pirateformsopt_subject_field' ),
@@ -398,8 +384,8 @@ class PirateForms_Admin {
398
  'class' => 'pirate-forms-grouped',
399
  ),
400
  'options' => array(
401
- '' => __( 'No', 'pirate-forms' ),
402
- 'yes' => __( 'Yes but not required', 'pirate-forms' ),
403
  'req' => __( 'Required', 'pirate-forms' ),
404
  ),
405
  ),
@@ -417,7 +403,8 @@ class PirateForms_Admin {
417
  'class' => 'pirate-forms-grouped',
418
  ),
419
  'options' => array(
420
- 'yes' => __( 'Yes but not required', 'pirate-forms' ),
 
421
  'req' => __( 'Required', 'pirate-forms' ),
422
  ),
423
  ),
@@ -434,8 +421,8 @@ class PirateForms_Admin {
434
  'class' => 'pirate-forms-grouped',
435
  ),
436
  'options' => array(
437
- '' => __( 'No', 'pirate-forms' ),
438
- 'yes' => __( 'Yes but not required', 'pirate-forms' ),
439
  'req' => __( 'Required', 'pirate-forms' ),
440
  ),
441
  ),
@@ -640,7 +627,7 @@ class PirateForms_Admin {
640
  'value' => __( 'Successful form submission text', 'pirate-forms' ),
641
  'html' => '<span class="dashicons dashicons-editor-help"></span>',
642
  'desc' => array(
643
- 'value' => __( 'This text is used on the page if no "Thank You" URL is set above. This is also used as the confirmation email title, if one is set to send out.', 'pirate-forms' ),
644
  'class' => 'pirate_forms_option_description',
645
  ),
646
  ),
311
  'id' => 'pirateformsopt_thank_you_url',
312
  'type' => 'select',
313
  'label' => array(
314
+ 'value' => __( 'Success Page', 'pirate-forms' ),
315
  'html' => '<span class="dashicons dashicons-editor-help"></span>',
316
  'desc' => array(
317
  'value' => __( 'Select the page that displays after a successful form submission. The page will be displayed without pausing on the email form, so please be sure to configure a relevant thank you message in this page.', 'pirate-forms' ),
338
  'type' => 'select',
339
  'label' => array(
340
  'value' => __( 'Name', 'pirate-forms' ),
 
 
 
 
 
341
  ),
342
  'default' => 'req',
343
  'value' => PirateForms_Util::get_option( 'pirateformsopt_name_field' ),
346
  'class' => 'pirate-forms-grouped',
347
  ),
348
  'options' => array(
349
+ '' => __( 'Do not display', 'pirate-forms' ),
350
+ 'yes' => __( 'Display but not required', 'pirate-forms' ),
351
  'req' => __( 'Required', 'pirate-forms' ),
352
  ),
353
  ),
357
  'type' => 'select',
358
  'label' => array(
359
  'value' => __( 'Email address', 'pirate-forms' ),
 
 
 
 
 
360
  ),
361
  'default' => 'req',
362
  'value' => PirateForms_Util::get_option( 'pirateformsopt_email_field' ),
365
  'class' => 'pirate-forms-grouped',
366
  ),
367
  'options' => array(
368
+ '' => __( 'Do not display', 'pirate-forms' ),
369
+ 'yes' => __( 'Display but not required', 'pirate-forms' ),
370
  'req' => __( 'Required', 'pirate-forms' ),
371
  ),
372
  ),
376
  'type' => 'select',
377
  'label' => array(
378
  'value' => __( 'Subject', 'pirate-forms' ),
 
 
 
 
 
379
  ),
380
  'default' => 'req',
381
  'value' => PirateForms_Util::get_option( 'pirateformsopt_subject_field' ),
384
  'class' => 'pirate-forms-grouped',
385
  ),
386
  'options' => array(
387
+ '' => __( 'Do not display', 'pirate-forms' ),
388
+ 'yes' => __( 'Display but not required', 'pirate-forms' ),
389
  'req' => __( 'Required', 'pirate-forms' ),
390
  ),
391
  ),
403
  'class' => 'pirate-forms-grouped',
404
  ),
405
  'options' => array(
406
+ '' => __( 'Do not display', 'pirate-forms' ),
407
+ 'yes' => __( 'Display but not required', 'pirate-forms' ),
408
  'req' => __( 'Required', 'pirate-forms' ),
409
  ),
410
  ),
421
  'class' => 'pirate-forms-grouped',
422
  ),
423
  'options' => array(
424
+ '' => __( 'Do not display', 'pirate-forms' ),
425
+ 'yes' => __( 'Display but not required', 'pirate-forms' ),
426
  'req' => __( 'Required', 'pirate-forms' ),
427
  ),
428
  ),
627
  'value' => __( 'Successful form submission text', 'pirate-forms' ),
628
  'html' => '<span class="dashicons dashicons-editor-help"></span>',
629
  'desc' => array(
630
+ 'value' => __( 'This text is used on the page if no Success Page is chosen above. This is also used as the confirmation email title, if one is set to send out.', 'pirate-forms' ),
631
  'class' => 'pirate_forms_option_description',
632
  ),
633
  ),
includes/class-pirateforms-html.php CHANGED
@@ -153,7 +153,7 @@ class PirateForms_HTML {
153
  }
154
 
155
  $html .= '</div>';
156
- return $html;
157
  }
158
 
159
  /**
153
  }
154
 
155
  $html .= '</div>';
156
+ return $this->get_wrap( $args, $html );
157
  }
158
 
159
  /**
includes/class-pirateforms-phpformbuilder.php CHANGED
@@ -22,8 +22,8 @@ class PirateForms_PhpFormBuilder {
22
  $pirate_forms_enctype = 'application/x-www-form-urlencoded';
23
  }
24
 
25
- $form_start = '<form method="post" enctype="' . $pirate_forms_enctype . '" action="" class="pirate_forms">';
26
- $this->set_element( 'form_start', $form_start );
27
 
28
  $html_helper = new PirateForms_HTML();
29
  $form_end = '';
@@ -33,8 +33,12 @@ class PirateForms_PhpFormBuilder {
33
  $form_end .= $element;
34
  }
35
  $this->set_element( $val['id'], $element );
 
36
  }
37
 
 
 
 
38
  $form_end .= '</form>';
39
  $this->set_element( 'form_end', $form_end );
40
 
22
  $pirate_forms_enctype = 'application/x-www-form-urlencoded';
23
  }
24
 
25
+ $classes = array();
26
+ $form_start = '<form method="post" enctype="' . $pirate_forms_enctype . '" action="" class="pirate_forms ';
27
 
28
  $html_helper = new PirateForms_HTML();
29
  $form_end = '';
33
  $form_end .= $element;
34
  }
35
  $this->set_element( $val['id'], $element );
36
+ $classes[] = $val['id'] . '-on';
37
  }
38
 
39
+ $form_start .= implode( ' ', $classes ) . '">';
40
+ $this->set_element( 'form_start', $form_start );
41
+
42
  $form_end .= '</form>';
43
  $this->set_element( 'form_end', $form_end );
44
 
includes/class-pirateforms.php CHANGED
@@ -69,7 +69,7 @@ class PirateForms {
69
  public function __construct() {
70
 
71
  $this->plugin_name = 'pirateforms';
72
- $this->version = '2.0.3';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();
69
  public function __construct() {
70
 
71
  $this->plugin_name = 'pirateforms';
72
+ $this->version = '2.0.4';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();
languages/pirate-forms.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: Free & Simple Contact Form Plugin - Pirateforms 2.0.3\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Codeinwp/pirate-forms/issues\n"
7
- "POT-Creation-Date: 2017-08-10 13:23:24+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -74,8 +74,8 @@ msgid ""
74
  msgstr ""
75
 
76
  #: admin/class-pirateforms-admin.php:270 admin/class-pirateforms-admin.php:289
77
- #: admin/class-pirateforms-admin.php:456 admin/class-pirateforms-admin.php:677
78
- #: admin/class-pirateforms-admin.php:720
79
  msgid "Yes"
80
  msgstr ""
81
 
@@ -104,7 +104,7 @@ msgid ""
104
  msgstr ""
105
 
106
  #: admin/class-pirateforms-admin.php:314
107
- msgid "\"Thank You\" Page"
108
  msgstr ""
109
 
110
  #: admin/class-pirateforms-admin.php:317
@@ -119,207 +119,200 @@ msgstr ""
119
  msgid "Fields Settings"
120
  msgstr ""
121
 
122
- #: admin/class-pirateforms-admin.php:340 admin/class-pirateforms-admin.php:503
123
  msgid "Name"
124
  msgstr ""
125
 
126
- #: admin/class-pirateforms-admin.php:343
127
- msgid "Do you want the name field to be displayed?"
128
- msgstr ""
129
-
130
- #: admin/class-pirateforms-admin.php:354 admin/class-pirateforms-admin.php:401
131
- #: admin/class-pirateforms-admin.php:437 admin/class-pirateforms-admin.php:739
132
- msgid "No"
133
  msgstr ""
134
 
135
- #: admin/class-pirateforms-admin.php:355 admin/class-pirateforms-admin.php:378
136
- #: admin/class-pirateforms-admin.php:402 admin/class-pirateforms-admin.php:420
137
- #: admin/class-pirateforms-admin.php:438
138
- msgid "Yes but not required"
139
  msgstr ""
140
 
141
- #: admin/class-pirateforms-admin.php:356 admin/class-pirateforms-admin.php:379
142
- #: admin/class-pirateforms-admin.php:403 admin/class-pirateforms-admin.php:421
143
- #: admin/class-pirateforms-admin.php:439
144
  msgid "Required"
145
  msgstr ""
146
 
147
- #: admin/class-pirateforms-admin.php:364
148
  msgid "Email address"
149
  msgstr ""
150
 
151
- #: admin/class-pirateforms-admin.php:367
152
- msgid "Do you want the email address field be displayed?"
153
- msgstr ""
154
-
155
- #: admin/class-pirateforms-admin.php:387 admin/class-pirateforms-admin.php:529
156
- #: admin/class-pirateforms-admin.php:531
157
  msgid "Subject"
158
  msgstr ""
159
 
160
- #: admin/class-pirateforms-admin.php:390
161
- msgid "Do you want the subject field be displayed?"
162
- msgstr ""
163
-
164
- #: admin/class-pirateforms-admin.php:411 admin/class-pirateforms-admin.php:542
165
  msgid "Message"
166
  msgstr ""
167
 
168
- #: admin/class-pirateforms-admin.php:429
169
  msgid "Attachment"
170
  msgstr ""
171
 
172
- #: admin/class-pirateforms-admin.php:447
173
  msgid "Add a reCAPTCHA"
174
  msgstr ""
175
 
176
- #: admin/class-pirateforms-admin.php:464
177
  msgid "Site key"
178
  msgstr ""
179
 
180
- #: admin/class-pirateforms-admin.php:467
181
  msgid "Create an account here "
182
  msgstr ""
183
 
184
- #: admin/class-pirateforms-admin.php:467
185
  msgid "to get the Site key and the Secret key for the reCaptcha."
186
  msgstr ""
187
 
188
- #: admin/class-pirateforms-admin.php:483
189
  msgid "Secret key"
190
  msgstr ""
191
 
192
- #: admin/class-pirateforms-admin.php:496
193
  #: admin/partials/pirateforms-settings-display.php:34
194
  msgid "Fields Labels"
195
  msgstr ""
196
 
197
- #: admin/class-pirateforms-admin.php:505
198
  msgid "Your Name"
199
  msgstr ""
200
 
201
- #: admin/class-pirateforms-admin.php:516
202
  msgid "Email"
203
  msgstr ""
204
 
205
- #: admin/class-pirateforms-admin.php:518
206
  msgid "Your Email"
207
  msgstr ""
208
 
209
- #: admin/class-pirateforms-admin.php:544
210
  msgid "Your message"
211
  msgstr ""
212
 
213
- #: admin/class-pirateforms-admin.php:555
214
  msgid "Submit button"
215
  msgstr ""
216
 
217
- #: admin/class-pirateforms-admin.php:568
218
  #: admin/partials/pirateforms-settings-display.php:37
219
  msgid "Alert Messages"
220
  msgstr ""
221
 
222
- #: admin/class-pirateforms-admin.php:575
223
  msgid "Name required and missing"
224
  msgstr ""
225
 
226
- #: admin/class-pirateforms-admin.php:577
227
  msgid "Enter your name"
228
  msgstr ""
229
 
230
- #: admin/class-pirateforms-admin.php:588
231
  msgid "E-mail required and missing"
232
  msgstr ""
233
 
234
- #: admin/class-pirateforms-admin.php:590
235
  msgid "Enter valid email"
236
  msgstr ""
237
 
238
- #: admin/class-pirateforms-admin.php:601
239
  msgid "Subject required and missing"
240
  msgstr ""
241
 
242
- #: admin/class-pirateforms-admin.php:603
243
  msgid "Please enter a subject"
244
  msgstr ""
245
 
246
- #: admin/class-pirateforms-admin.php:614
247
  msgid "Question/comment is missing"
248
  msgstr ""
249
 
250
- #: admin/class-pirateforms-admin.php:616
251
  msgid "Enter your question or comment"
252
  msgstr ""
253
 
254
- #: admin/class-pirateforms-admin.php:627
255
  msgid "Attachment is missing"
256
  msgstr ""
257
 
258
- #: admin/class-pirateforms-admin.php:629
259
  msgid "Please add an attachment"
260
  msgstr ""
261
 
262
- #: admin/class-pirateforms-admin.php:640
263
  msgid "Successful form submission text"
264
  msgstr ""
265
 
266
- #: admin/class-pirateforms-admin.php:643
267
  msgid ""
268
- "This text is used on the page if no \"Thank You\" URL is set above. This is "
269
  "also used as the confirmation email title, if one is set to send out."
270
  msgstr ""
271
 
272
- #: admin/class-pirateforms-admin.php:647
273
  msgid "Thanks, your email was sent successfully!"
274
  msgstr ""
275
 
276
- #: admin/class-pirateforms-admin.php:658
277
  msgid "SMTP Options"
278
  msgstr ""
279
 
280
- #: admin/class-pirateforms-admin.php:665
281
  msgid "Use SMTP to send emails?"
282
  msgstr ""
283
 
284
- #: admin/class-pirateforms-admin.php:668
285
  msgid "Instead of PHP mail function"
286
  msgstr ""
287
 
288
- #: admin/class-pirateforms-admin.php:683
289
  msgid "SMTP Host"
290
  msgstr ""
291
 
292
- #: admin/class-pirateforms-admin.php:695
293
  msgid "SMTP Port"
294
  msgstr ""
295
 
296
- #: admin/class-pirateforms-admin.php:707
297
  msgid "Use SMTP Authentication?"
298
  msgstr ""
299
 
300
- #: admin/class-pirateforms-admin.php:710 admin/class-pirateforms-admin.php:729
301
  msgid ""
302
  "If you check this box, make sure the SMTP Username and SMTP Password are "
303
  "completed."
304
  msgstr ""
305
 
306
- #: admin/class-pirateforms-admin.php:726
307
  msgid "Security?"
308
  msgstr ""
309
 
310
- #: admin/class-pirateforms-admin.php:740
 
 
 
 
311
  msgid "SSL"
312
  msgstr ""
313
 
314
- #: admin/class-pirateforms-admin.php:741
315
  msgid "TLS"
316
  msgstr ""
317
 
318
- #: admin/class-pirateforms-admin.php:748
319
  msgid "SMTP Username"
320
  msgstr ""
321
 
322
- #: admin/class-pirateforms-admin.php:760
323
  msgid "SMTP Password"
324
  msgstr ""
325
 
@@ -525,24 +518,24 @@ msgstr ""
525
  msgid "Sent from page: "
526
  msgstr ""
527
 
528
- #: public/class-pirateforms-public.php:337
529
- #: public/class-pirateforms-public.php:349
530
  msgid "Wrong reCAPTCHA"
531
  msgstr ""
532
 
533
- #: public/class-pirateforms-public.php:391
534
  msgid "Uploaded file is not allowed for file type"
535
  msgstr ""
536
 
537
- #: public/class-pirateforms-public.php:399
538
  msgid "Uploaded file is too large"
539
  msgstr ""
540
 
541
- #: public/class-pirateforms-public.php:415
542
  msgid "There was an unknown error uploading the file."
543
  msgstr ""
544
 
545
- #: public/class-pirateforms-public.php:801
546
  msgid "Submit"
547
  msgstr ""
548
 
4
  msgstr ""
5
  "Project-Id-Version: Free & Simple Contact Form Plugin - Pirateforms 2.0.3\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Codeinwp/pirate-forms/issues\n"
7
+ "POT-Creation-Date: 2017-08-14 09:11:43+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
74
  msgstr ""
75
 
76
  #: admin/class-pirateforms-admin.php:270 admin/class-pirateforms-admin.php:289
77
+ #: admin/class-pirateforms-admin.php:443 admin/class-pirateforms-admin.php:664
78
+ #: admin/class-pirateforms-admin.php:707
79
  msgid "Yes"
80
  msgstr ""
81
 
104
  msgstr ""
105
 
106
  #: admin/class-pirateforms-admin.php:314
107
+ msgid "Success Page"
108
  msgstr ""
109
 
110
  #: admin/class-pirateforms-admin.php:317
119
  msgid "Fields Settings"
120
  msgstr ""
121
 
122
+ #: admin/class-pirateforms-admin.php:340 admin/class-pirateforms-admin.php:490
123
  msgid "Name"
124
  msgstr ""
125
 
126
+ #: admin/class-pirateforms-admin.php:349 admin/class-pirateforms-admin.php:368
127
+ #: admin/class-pirateforms-admin.php:387 admin/class-pirateforms-admin.php:406
128
+ #: admin/class-pirateforms-admin.php:424
129
+ msgid "Do not display"
 
 
 
130
  msgstr ""
131
 
132
+ #: admin/class-pirateforms-admin.php:350 admin/class-pirateforms-admin.php:369
133
+ #: admin/class-pirateforms-admin.php:388 admin/class-pirateforms-admin.php:407
134
+ #: admin/class-pirateforms-admin.php:425
135
+ msgid "Display but not required"
136
  msgstr ""
137
 
138
+ #: admin/class-pirateforms-admin.php:351 admin/class-pirateforms-admin.php:370
139
+ #: admin/class-pirateforms-admin.php:389 admin/class-pirateforms-admin.php:408
140
+ #: admin/class-pirateforms-admin.php:426
141
  msgid "Required"
142
  msgstr ""
143
 
144
+ #: admin/class-pirateforms-admin.php:359
145
  msgid "Email address"
146
  msgstr ""
147
 
148
+ #: admin/class-pirateforms-admin.php:378 admin/class-pirateforms-admin.php:516
149
+ #: admin/class-pirateforms-admin.php:518
 
 
 
 
150
  msgid "Subject"
151
  msgstr ""
152
 
153
+ #: admin/class-pirateforms-admin.php:397 admin/class-pirateforms-admin.php:529
 
 
 
 
154
  msgid "Message"
155
  msgstr ""
156
 
157
+ #: admin/class-pirateforms-admin.php:416
158
  msgid "Attachment"
159
  msgstr ""
160
 
161
+ #: admin/class-pirateforms-admin.php:434
162
  msgid "Add a reCAPTCHA"
163
  msgstr ""
164
 
165
+ #: admin/class-pirateforms-admin.php:451
166
  msgid "Site key"
167
  msgstr ""
168
 
169
+ #: admin/class-pirateforms-admin.php:454
170
  msgid "Create an account here "
171
  msgstr ""
172
 
173
+ #: admin/class-pirateforms-admin.php:454
174
  msgid "to get the Site key and the Secret key for the reCaptcha."
175
  msgstr ""
176
 
177
+ #: admin/class-pirateforms-admin.php:470
178
  msgid "Secret key"
179
  msgstr ""
180
 
181
+ #: admin/class-pirateforms-admin.php:483
182
  #: admin/partials/pirateforms-settings-display.php:34
183
  msgid "Fields Labels"
184
  msgstr ""
185
 
186
+ #: admin/class-pirateforms-admin.php:492
187
  msgid "Your Name"
188
  msgstr ""
189
 
190
+ #: admin/class-pirateforms-admin.php:503
191
  msgid "Email"
192
  msgstr ""
193
 
194
+ #: admin/class-pirateforms-admin.php:505
195
  msgid "Your Email"
196
  msgstr ""
197
 
198
+ #: admin/class-pirateforms-admin.php:531
199
  msgid "Your message"
200
  msgstr ""
201
 
202
+ #: admin/class-pirateforms-admin.php:542
203
  msgid "Submit button"
204
  msgstr ""
205
 
206
+ #: admin/class-pirateforms-admin.php:555
207
  #: admin/partials/pirateforms-settings-display.php:37
208
  msgid "Alert Messages"
209
  msgstr ""
210
 
211
+ #: admin/class-pirateforms-admin.php:562
212
  msgid "Name required and missing"
213
  msgstr ""
214
 
215
+ #: admin/class-pirateforms-admin.php:564
216
  msgid "Enter your name"
217
  msgstr ""
218
 
219
+ #: admin/class-pirateforms-admin.php:575
220
  msgid "E-mail required and missing"
221
  msgstr ""
222
 
223
+ #: admin/class-pirateforms-admin.php:577
224
  msgid "Enter valid email"
225
  msgstr ""
226
 
227
+ #: admin/class-pirateforms-admin.php:588
228
  msgid "Subject required and missing"
229
  msgstr ""
230
 
231
+ #: admin/class-pirateforms-admin.php:590
232
  msgid "Please enter a subject"
233
  msgstr ""
234
 
235
+ #: admin/class-pirateforms-admin.php:601
236
  msgid "Question/comment is missing"
237
  msgstr ""
238
 
239
+ #: admin/class-pirateforms-admin.php:603
240
  msgid "Enter your question or comment"
241
  msgstr ""
242
 
243
+ #: admin/class-pirateforms-admin.php:614
244
  msgid "Attachment is missing"
245
  msgstr ""
246
 
247
+ #: admin/class-pirateforms-admin.php:616
248
  msgid "Please add an attachment"
249
  msgstr ""
250
 
251
+ #: admin/class-pirateforms-admin.php:627
252
  msgid "Successful form submission text"
253
  msgstr ""
254
 
255
+ #: admin/class-pirateforms-admin.php:630
256
  msgid ""
257
+ "This text is used on the page if no Success Page is chosen above. This is "
258
  "also used as the confirmation email title, if one is set to send out."
259
  msgstr ""
260
 
261
+ #: admin/class-pirateforms-admin.php:634
262
  msgid "Thanks, your email was sent successfully!"
263
  msgstr ""
264
 
265
+ #: admin/class-pirateforms-admin.php:645
266
  msgid "SMTP Options"
267
  msgstr ""
268
 
269
+ #: admin/class-pirateforms-admin.php:652
270
  msgid "Use SMTP to send emails?"
271
  msgstr ""
272
 
273
+ #: admin/class-pirateforms-admin.php:655
274
  msgid "Instead of PHP mail function"
275
  msgstr ""
276
 
277
+ #: admin/class-pirateforms-admin.php:670
278
  msgid "SMTP Host"
279
  msgstr ""
280
 
281
+ #: admin/class-pirateforms-admin.php:682
282
  msgid "SMTP Port"
283
  msgstr ""
284
 
285
+ #: admin/class-pirateforms-admin.php:694
286
  msgid "Use SMTP Authentication?"
287
  msgstr ""
288
 
289
+ #: admin/class-pirateforms-admin.php:697 admin/class-pirateforms-admin.php:716
290
  msgid ""
291
  "If you check this box, make sure the SMTP Username and SMTP Password are "
292
  "completed."
293
  msgstr ""
294
 
295
+ #: admin/class-pirateforms-admin.php:713
296
  msgid "Security?"
297
  msgstr ""
298
 
299
+ #: admin/class-pirateforms-admin.php:726
300
+ msgid "No"
301
+ msgstr ""
302
+
303
+ #: admin/class-pirateforms-admin.php:727
304
  msgid "SSL"
305
  msgstr ""
306
 
307
+ #: admin/class-pirateforms-admin.php:728
308
  msgid "TLS"
309
  msgstr ""
310
 
311
+ #: admin/class-pirateforms-admin.php:735
312
  msgid "SMTP Username"
313
  msgstr ""
314
 
315
+ #: admin/class-pirateforms-admin.php:747
316
  msgid "SMTP Password"
317
  msgstr ""
318
 
518
  msgid "Sent from page: "
519
  msgstr ""
520
 
521
+ #: public/class-pirateforms-public.php:343
522
+ #: public/class-pirateforms-public.php:355
523
  msgid "Wrong reCAPTCHA"
524
  msgstr ""
525
 
526
+ #: public/class-pirateforms-public.php:397
527
  msgid "Uploaded file is not allowed for file type"
528
  msgstr ""
529
 
530
+ #: public/class-pirateforms-public.php:405
531
  msgid "Uploaded file is too large"
532
  msgstr ""
533
 
534
+ #: public/class-pirateforms-public.php:421
535
  msgid "There was an unknown error uploading the file."
536
  msgstr ""
537
 
538
+ #: public/class-pirateforms-public.php:803
539
  msgid "Submit"
540
  msgstr ""
541
 
pirate-forms.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: Free & Simple Contact Form Plugin - Pirateforms
17
  * Plugin URI: http://themeisle.com/plugins/pirate-forms/
18
  * Description: Easily creates a nice looking, simple contact form on your WP site.
19
- * Version: 2.0.3
20
  * Author: Themeisle
21
  * Author URI: http://themeisle.com
22
  * Text Domain: pirate-forms
@@ -35,7 +35,7 @@ if ( ! defined( 'WPINC' ) ) {
35
 
36
  define( 'PIRATEFORMS_NAME', 'Pirate Forms' );
37
  define( 'PIRATEFORMS_SLUG', 'pirate-forms' );
38
- define( 'PIRATE_FORMS_VERSION', '2.0.3' );
39
  define( 'PIRATEFORMS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
40
  define( 'PIRATEFORMS_URL', plugin_dir_url( __FILE__ ) );
41
  define( 'PIRATEFORMS_BASENAME', plugin_basename( __FILE__ ) );
16
  * Plugin Name: Free & Simple Contact Form Plugin - Pirateforms
17
  * Plugin URI: http://themeisle.com/plugins/pirate-forms/
18
  * Description: Easily creates a nice looking, simple contact form on your WP site.
19
+ * Version: 2.0.4
20
  * Author: Themeisle
21
  * Author URI: http://themeisle.com
22
  * Text Domain: pirate-forms
35
 
36
  define( 'PIRATEFORMS_NAME', 'Pirate Forms' );
37
  define( 'PIRATEFORMS_SLUG', 'pirate-forms' );
38
+ define( 'PIRATE_FORMS_VERSION', '2.0.4' );
39
  define( 'PIRATEFORMS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
40
  define( 'PIRATEFORMS_URL', plugin_dir_url( __FILE__ ) );
41
  define( 'PIRATEFORMS_BASENAME', plugin_basename( __FILE__ ) );
public/class-pirateforms-public.php CHANGED
@@ -254,6 +254,9 @@ class PirateForms_Public {
254
  do_action( 'pirate_forms_before_sending', $pirate_forms_contact_email, $site_recipients, $subject, $body, $headers, $attachments );
255
  do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'before sending email to = %s, subject = %s, body = %s, headers = %s, attachments = %s', $site_recipients, $subject, $body, $headers, print_r( $attachments, true ) ), 'debug', __FILE__, __LINE__ );
256
  $response = wp_mail( $site_recipients, $subject, $body, $headers, $attachments );
 
 
 
257
  do_action( 'pirate_forms_after_sending', $pirate_forms_options, $response, $pirate_forms_contact_email, $site_recipients, $subject, $body, $headers, $attachments );
258
  do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'after sending email, response = %s', $response ), 'debug', __FILE__, __LINE__ );
259
 
@@ -285,7 +288,7 @@ class PirateForms_Public {
285
  do_action( 'pirate_forms_after_sending_confirm', $pirate_forms_options, $response, $pirate_forms_contact_email, $pirate_forms_contact_email, $subject, $confirm_body, $headers );
286
  do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'after sending confirm email response = %s', $response ), 'debug', __FILE__, __LINE__ );
287
  if ( ! $response ) {
288
- error_log( 'Email not sent' );
289
  }
290
  }
291
 
@@ -313,7 +316,10 @@ class PirateForms_Public {
313
  $redirect = get_permalink( $redirect_id );
314
  wp_safe_redirect( $redirect );
315
  } elseif ( ( 'Zerif Lite' == $pirate_forms_current_theme->name ) || ( 'Zerif Lite' == $pirate_forms_current_theme->parent_theme ) || ( 'Zerif PRO' == $pirate_forms_current_theme->name ) || ( 'Zerif PRO' == $pirate_forms_current_theme->parent_theme ) ) {
316
- $redirect = $_SERVER['HTTP_REFERER'] . ( strpos( $_SERVER['HTTP_REFERER'], '?' ) === false ? '?' : '&' ) . 'pcf=1#contact';
 
 
 
317
  wp_safe_redirect( $redirect );
318
  }
319
  }// End if().
@@ -614,15 +620,11 @@ class PirateForms_Public {
614
 
615
  $error_key = wp_create_nonce( get_bloginfo( 'admin_email' ) . ( empty( $atts['from'] ) ? 'no' : 'yes' ) );
616
 
617
- $thank_you_message = '';
618
- /* thank you message */
619
- if ( ( ( isset( $_GET['pcf'] ) && $_GET['pcf'] == 1 ) || ( isset( $_POST['pirate-forms-contact-submit'] ) ) ) && empty( $_SESSION[ $error_key ] ) ) {
620
- $show_nonce = PirateForms_Util::get_option( 'pirateformsopt_nonce' );
621
- $nonce_val = get_bloginfo( 'admin_email' ) . ( empty( $atts['from'] ) ? 'no' : 'yes' );
622
- if ( empty( $show_nonce ) || ( 'yes' === $show_nonce && wp_verify_nonce( $_POST['wordpress-nonce'], $nonce_val ) ) ) {
623
- $thank_you_message = sanitize_text_field( $pirate_forms_options['pirateformsopt_label_submit'] );
624
- }
625
  }
 
626
  $pirate_form->set_element( 'thank_you_message', $thank_you_message );
627
 
628
  /**
@@ -755,7 +757,7 @@ class PirateForms_Public {
755
  ****** Message field */
756
  if ( ! empty( $field ) && 'no' !== $field ) :
757
  $required = $field === 'req' ? true : false;
758
- $wrap_classes = array( 'contact_attachment_wrap ' );
759
  // If this field was submitted with invalid data
760
  if ( isset( $_SESSION[ $error_key ]['contact-attachment'] ) ) {
761
  $wrap_classes[] = 'error';
254
  do_action( 'pirate_forms_before_sending', $pirate_forms_contact_email, $site_recipients, $subject, $body, $headers, $attachments );
255
  do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'before sending email to = %s, subject = %s, body = %s, headers = %s, attachments = %s', $site_recipients, $subject, $body, $headers, print_r( $attachments, true ) ), 'debug', __FILE__, __LINE__ );
256
  $response = wp_mail( $site_recipients, $subject, $body, $headers, $attachments );
257
+ if ( ! $response ) {
258
+ error_log( 'Email not sent' );
259
+ }
260
  do_action( 'pirate_forms_after_sending', $pirate_forms_options, $response, $pirate_forms_contact_email, $site_recipients, $subject, $body, $headers, $attachments );
261
  do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'after sending email, response = %s', $response ), 'debug', __FILE__, __LINE__ );
262
 
288
  do_action( 'pirate_forms_after_sending_confirm', $pirate_forms_options, $response, $pirate_forms_contact_email, $pirate_forms_contact_email, $subject, $confirm_body, $headers );
289
  do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'after sending confirm email response = %s', $response ), 'debug', __FILE__, __LINE__ );
290
  if ( ! $response ) {
291
+ error_log( 'Confirm email not sent' );
292
  }
293
  }
294
 
316
  $redirect = get_permalink( $redirect_id );
317
  wp_safe_redirect( $redirect );
318
  } elseif ( ( 'Zerif Lite' == $pirate_forms_current_theme->name ) || ( 'Zerif Lite' == $pirate_forms_current_theme->parent_theme ) || ( 'Zerif PRO' == $pirate_forms_current_theme->name ) || ( 'Zerif PRO' == $pirate_forms_current_theme->parent_theme ) ) {
319
+ $redirect = $_SERVER['HTTP_REFERER'] . ( strpos( $_SERVER['HTTP_REFERER'], '?' ) === false ? '?' : '&' ) . 'pcf=1#contact&done';
320
+ wp_safe_redirect( $redirect );
321
+ } elseif ( isset( $_SERVER['HTTP_REFERER'] ) ) {
322
+ $redirect = $_SERVER['HTTP_REFERER'] . ( strpos( $_SERVER['HTTP_REFERER'], '?' ) === false ? '?' : '&' ) . 'done';
323
  wp_safe_redirect( $redirect );
324
  }
325
  }// End if().
620
 
621
  $error_key = wp_create_nonce( get_bloginfo( 'admin_email' ) . ( empty( $atts['from'] ) ? 'no' : 'yes' ) );
622
 
623
+ $thank_you_message = '';
624
+ if ( isset( $_GET['done'] ) ) {
625
+ $thank_you_message = sanitize_text_field( $pirate_forms_options['pirateformsopt_label_submit'] );
 
 
 
 
 
626
  }
627
+
628
  $pirate_form->set_element( 'thank_you_message', $thank_you_message );
629
 
630
  /**
757
  ****** Message field */
758
  if ( ! empty( $field ) && 'no' !== $field ) :
759
  $required = $field === 'req' ? true : false;
760
+ $wrap_classes = array( 'col-sm-12 col-lg-12 form_field_wrap contact_attachment_wrap' );
761
  // If this field was submitted with invalid data
762
  if ( isset( $_SESSION[ $error_key ]['contact-attachment'] ) ) {
763
  $wrap_classes[] = 'error';
public/css/front.css CHANGED
@@ -1,5 +1,5 @@
1
  /*
2
- Version: 2.0.3
3
  */
4
  .pirate_forms_wrap .form_field_wrap {
5
  margin-bottom: 20px;
1
  /*
2
+ Version: 2.0.4
3
  */
4
  .pirate_forms_wrap .form_field_wrap {
5
  margin-bottom: 20px;
public/partials/pirateforms-form.php CHANGED
@@ -46,25 +46,25 @@ if ( ! empty( $this->thank_you_message ) ) :
46
  <?php echo $this->contact_name; ?>
47
  <?php } ?>
48
 
49
- <?php echo $this->contact_email; ?>
 
 
50
 
51
  <?php if ( isset( $this->contact_subject ) ) { ?>
52
  <?php echo $this->contact_subject; ?>
53
  <?php } ?>
54
  </div>
55
 
56
- <?php echo $this->contact_message; ?>
 
 
57
 
58
  <?php if ( isset( $this->attachment ) ) { ?>
59
- <div class="col-sm-12 col-lg-12 form_field_wrap contact_attachment_wrap ">
60
- <?php echo $this->attachment; ?>
61
- </div>
62
  <?php } ?>
63
 
64
  <?php if ( isset( $this->captcha ) ) { ?>
65
- <div class="col-xs-12 col-sm-6 col-lg-6 form_field_wrap form_captcha_wrap">
66
- <?php echo $this->captcha; ?>
67
- </div>
68
  <?php } ?>
69
 
70
  <?php echo $this->contact_submit; ?>
46
  <?php echo $this->contact_name; ?>
47
  <?php } ?>
48
 
49
+ <?php if ( isset( $this->contact_email ) ) { ?>
50
+ <?php echo $this->contact_email; ?>
51
+ <?php } ?>
52
 
53
  <?php if ( isset( $this->contact_subject ) ) { ?>
54
  <?php echo $this->contact_subject; ?>
55
  <?php } ?>
56
  </div>
57
 
58
+ <?php if ( isset( $this->contact_message ) ) { ?>
59
+ <?php echo $this->contact_message; ?>
60
+ <?php } ?>
61
 
62
  <?php if ( isset( $this->attachment ) ) { ?>
63
+ <?php echo $this->attachment; ?>
 
 
64
  <?php } ?>
65
 
66
  <?php if ( isset( $this->captcha ) ) { ?>
67
+ <?php echo $this->captcha; ?>
 
 
68
  <?php } ?>
69
 
70
  <?php echo $this->contact_submit; ?>
readme.txt CHANGED
@@ -130,6 +130,13 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you'
130
  4. Screenshot 4. Enabling SMTP
131
 
132
  == Changelog ==
 
 
 
 
 
 
 
133
  = 2.0.3 - 2017-08-10 =
134
 
135
  * Fixed fatal errors on some environments because of anonymous functions usage.
130
  4. Screenshot 4. Enabling SMTP
131
 
132
  == Changelog ==
133
+ = 2.0.4 - 2017-08-14 =
134
+
135
+ * All fields are now optional.
136
+ * Fixed redirect after form submission.
137
+ * Added more flexibility for changing the layout via dynamic CSS classes.
138
+
139
+
140
  = 2.0.3 - 2017-08-10 =
141
 
142
  * Fixed fatal errors on some environments because of anonymous functions usage.
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitb1856054a631a177579466683046d7bd::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitc82fb3d4309edfd8ea523799ad4e4047::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInitac9656859fc8ae65c43579e28fab5722::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInit6e188c71a42c36997d2c289096f78e62::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitb1856054a631a177579466683046d7bd
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitb1856054a631a177579466683046d7bd
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitb1856054a631a177579466683046d7bd', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitb1856054a631a177579466683046d7bd', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
@@ -42,14 +42,14 @@ class ComposerAutoloaderInitb1856054a631a177579466683046d7bd
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
- composerRequireb1856054a631a177579466683046d7bd($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
- function composerRequireb1856054a631a177579466683046d7bd($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitc82fb3d4309edfd8ea523799ad4e4047
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitc82fb3d4309edfd8ea523799ad4e4047', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitc82fb3d4309edfd8ea523799ad4e4047', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
+ composerRequirec82fb3d4309edfd8ea523799ad4e4047($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
+ function composerRequirec82fb3d4309edfd8ea523799ad4e4047($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  require $file;
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInitac9656859fc8ae65c43579e28fab5722 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitac9656859fc8ae65c43579e28fab5722 {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitac9656859fc8ae65c43579e28fab5722', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitac9656859fc8ae65c43579e28fab5722', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInit6e188c71a42c36997d2c289096f78e62 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit6e188c71a42c36997d2c289096f78e62', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit6e188c71a42c36997d2c289096f78e62', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);