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

Version Description

Download this release

Release Info

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

Version 1.0.3

css/front.css ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .pirate_forms_wrap .form_field_wrap {
2
+ margin-bottom: 20px;
3
+ }
4
+ .pirate-forms-g-recaptcha {
5
+ display: none;
6
+ }
7
+ .pirate_forms_wrap {
8
+ float:left;
9
+ width: 100%;
10
+ }
11
+ .sidebar .pirate_forms_wrap, .sidebar-wrap .pirate_forms_wrap, #sidebar-secondary .pirate_forms_wrap {
12
+ margin-bottom: 20px;
13
+ }
14
+ .sidebar .form_field_wrap, .sidebar-wrap .form_field_wrap, #sidebar-secondary .form_field_wrap {
15
+ width: 100%;
16
+ }
17
+ .sidebar .pirate-forms-submit-button, .sidebar-wrap .pirate-forms-submit-button, #sidebar-secondary .pirate-forms-submit-button {
18
+ float:left !important;
19
+ margin-left: 15px;
20
+ width: 90%;
21
+ }
22
+ .sidebar .pirate_forms_wrap label, .sidebar-wrap .pirate_forms_wrap label, #sidebar-secondary .pirate_forms_wrap label {
23
+ display: none;
24
+ }
css/wp-admin.css ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .pirate-forms-nav-tabs a {
2
+ box-shadow: none !important;
3
+ -webkit-box-shadow: none !important;
4
+ }
5
+ .pirate-forms-postbox {
6
+ margin-top: 20px;
7
+ padding: 10px 20px;
8
+ background: #fff;
9
+ }
10
+ .pirate-forms-nav-tabs {
11
+ margin-bottom: 0;
12
+ }
13
+ .pirate-forms-nav-tabs:after {
14
+ clear: both;
15
+ display: table;
16
+ content: " ";
17
+ }
18
+ .pirate-forms-nav-tabs > li {
19
+ float: left;
20
+ margin-bottom: -1px;
21
+ display: block;
22
+ }
23
+ .pirate-forms-nav-tabs > li > a {
24
+ border: 1px solid transparent;
25
+ border-radius: 4px 4px 0 0;
26
+ display: block;
27
+ padding: 10px 15px;
28
+ text-decoration: none;
29
+ }
30
+ .pirate-forms-nav-tabs > li.active > a, .pirate-forms-nav-tabs > li.active > a:focus, .pirate-forms-nav-tabs > li.active > a:hover {
31
+ color: #555;
32
+ background-color: #fff;
33
+ border: 1px solid #ddd;
34
+ border-bottom-color: transparent;
35
+ font-weight: bold;
36
+ }
37
+ .pirate-forms-nav-tabs > li.zerif-lite-w-red-tab > a {
38
+ color: red;
39
+ font-weight: bold;
40
+ }
41
+ .pirate-forms-tab-content {
42
+ background-color: #fff;
43
+ border-bottom: 1px solid #ddd;
44
+ border-right: 1px solid #ddd;
45
+ border-left: 1px solid #ddd;
46
+ width: 960px;
47
+ float: left;
48
+ }
49
+ .pirate-forms-tab-content > .tab-pane {
50
+ display: none;
51
+ }
52
+ .pirate-forms-tab-content > .active {
53
+ display: block;
54
+ }
55
+
56
+ .pirate-forms-tab-pane {
57
+ padding: 30px;
58
+ }
59
+ .pirate-forms-tab-pane {
60
+ display: none;
61
+ }
62
+ .pirate-forms-tab-pane.active {
63
+ display: block;
64
+ }
65
+ .pirate-forms-grouped {
66
+ margin-bottom: .5em;
67
+ }
68
+ .pirate-forms-grouped label {
69
+ text-align: right;
70
+ display: inline-block;
71
+ width: 260px;
72
+ margin: 0 1em 0 0;
73
+ font-size: 15px;
74
+ font-weight: bold;
75
+ }
76
+ .pirate-forms-grouped label span {
77
+ font-size: 11px;
78
+ font-weight: normal;
79
+ }
80
+ .pirate-forms-grouped select,.pirate-forms-grouped input[type="text"] {
81
+ display: inline-block;
82
+ }
83
+ .pirate-forms-grouped input[type="text"] {
84
+ width: 30%;
85
+ }
86
+
87
+ .ajaxAnimation { background: url("../img/loader.gif") no-repeat center center, rgba(255,255,255,0.8); position: absolute;top: 0; left: 0; right: 0; bottom: 0; display: none;}
img/loader.gif ADDED
Binary file
inc/PhpFormBuilder.php ADDED
@@ -0,0 +1,513 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // v 0.8.6
4
+
5
+ class PhpFormBuilder {
6
+
7
+ // Stores all form inputs
8
+ private $inputs = array();
9
+
10
+ // Stores all form attributes
11
+ private $form = array();
12
+
13
+ // Does this form have a submit value?
14
+ private $has_submit = false;
15
+
16
+ /**
17
+ * Constructor function to set form action and attributes
18
+ *
19
+ * @param string $action
20
+ * @param bool $args
21
+ */
22
+ function __construct( $action = '', $args = false ) {
23
+
24
+ // Default form attributes
25
+ $defaults = array(
26
+ 'action' => $action,
27
+ 'method' => 'post',
28
+ 'enctype' => 'application/x-www-form-urlencoded',
29
+ 'class' => array(),
30
+ 'id' => '',
31
+ 'markup' => 'html',
32
+ 'novalidate' => false,
33
+ 'add_nonce' => false,
34
+ 'add_honeypot' => true,
35
+ 'form_element' => true,
36
+ 'add_submit' => true
37
+ );
38
+
39
+ // Merge with arguments, if present
40
+ if ( $args ) {
41
+ $settings = array_merge( $defaults, $args );
42
+ } // Otherwise, use the defaults wholesale
43
+ else {
44
+ $settings = $defaults;
45
+ }
46
+
47
+ // Iterate through and save each option
48
+ foreach ( $settings as $key => $val ) {
49
+ // Try setting with user-passed setting
50
+ // If not, try the default with the same key name
51
+ if ( ! $this->set_att( $key, $val ) ) {
52
+ $this->set_att( $key, $defaults[ $key ] );
53
+ }
54
+ }
55
+ }
56
+
57
+ /**
58
+ * Validate and set form
59
+ *
60
+ * @param string $key A valid key; switch statement ensures validity
61
+ * @param string | bool $val A valid value; validated for each key
62
+ *
63
+ * @return bool
64
+ */
65
+ function set_att( $key, $val ) {
66
+
67
+ switch ( $key ) :
68
+
69
+ case 'action':
70
+ break;
71
+
72
+ case 'method':
73
+ if ( ! in_array( $val, array( 'post', 'get' ) ) ) {
74
+ return false;
75
+ }
76
+ break;
77
+
78
+ case 'enctype':
79
+ if ( ! in_array( $val, array( 'application/x-www-form-urlencoded', 'multipart/form-data' ) ) ) {
80
+ return false;
81
+ }
82
+ break;
83
+
84
+ case 'markup':
85
+ if ( ! in_array( $val, array( 'html', 'xhtml' ) ) ) {
86
+ return false;
87
+ }
88
+ break;
89
+
90
+ case 'class':
91
+ case 'id':
92
+ if ( ! $this->_check_valid_attr( $val ) ) {
93
+ return false;
94
+ }
95
+ break;
96
+
97
+ case 'novalidate':
98
+ case 'add_honeypot':
99
+ case 'form_element':
100
+ case 'add_submit':
101
+ if ( ! is_bool( $val ) ) {
102
+ return false;
103
+ }
104
+ break;
105
+
106
+ case 'add_nonce':
107
+ if ( ! is_string( $val ) && ! is_bool( $val ) ) {
108
+ return false;
109
+ }
110
+ break;
111
+
112
+ default:
113
+ return false;
114
+
115
+ endswitch;
116
+
117
+ $this->form[ $key ] = $val;
118
+
119
+ return true;
120
+
121
+ }
122
+
123
+ /**
124
+ * Add an input field to the form for outputting later
125
+ *
126
+ * @param string $label
127
+ * @param string $args
128
+ * @param string $slug
129
+ */
130
+ function add_input( $label, $args = '', $slug = '' ) {
131
+
132
+ if ( empty( $args ) ) {
133
+ $args = array();
134
+ }
135
+
136
+ // Create a valid id or class attribute
137
+ if ( empty( $slug ) ) {
138
+ $slug = $this->_make_slug( $label );
139
+ }
140
+
141
+ $defaults = array(
142
+ 'type' => 'text',
143
+ 'name' => $slug,
144
+ 'id' => $slug,
145
+ 'label' => $label,
146
+ 'value' => '',
147
+ 'placeholder' => '',
148
+ 'class' => array(),
149
+ 'min' => '',
150
+ 'max' => '',
151
+ 'step' => '',
152
+ 'autofocus' => false,
153
+ 'checked' => false,
154
+ 'selected' => false,
155
+ 'required' => false,
156
+ 'add_label' => true,
157
+ 'options' => array(),
158
+ 'wrap_tag' => 'div',
159
+ 'wrap_class' => array( 'form_field_wrap' ),
160
+ 'wrap_id' => '',
161
+ 'wrap_style' => '',
162
+ 'before_html' => '',
163
+ 'after_html' => '',
164
+ 'request_populate' => true
165
+ );
166
+
167
+ // Combined defaults and arguments
168
+ // Arguments override defaults
169
+ $args = array_merge( $defaults, $args );
170
+ $this->inputs[ $slug ] = $args;
171
+
172
+ }
173
+
174
+ /**
175
+ * Add multiple inputs to the input queue
176
+ *
177
+ * @param $arr
178
+ *
179
+ * @return bool
180
+ */
181
+ function add_inputs( $arr ) {
182
+
183
+ if ( ! is_array( $arr ) ) {
184
+ return false;
185
+ }
186
+
187
+ foreach ( $arr as $field ) {
188
+ $this->add_input(
189
+ $field[0], isset( $field[1] ) ? $field[1] : '',
190
+ isset( $field[2] ) ? $field[2] : ''
191
+ );
192
+ }
193
+
194
+ return true;
195
+ }
196
+
197
+ /**
198
+ * Build the HTML for the form based on the input queue
199
+ *
200
+ * @param bool $echo Should the HTML be echoed or returned?
201
+ *
202
+ * @return string
203
+ */
204
+ function build_form( $echo = true ) {
205
+
206
+ $output = '';
207
+
208
+ if ( $this->form['form_element'] ) {
209
+ $output .= '<form method="' . $this->form['method'] . '" ';
210
+
211
+ if ( ! empty( $this->form['enctype'] ) ) {
212
+ $output .= ' enctype="' . $this->form['enctype'] . '"';
213
+ }
214
+
215
+ if ( ! empty( $this->form['action'] ) ) {
216
+ $output .= ' action="' . $this->form['action'] . '"';
217
+ }
218
+
219
+ if ( ! empty( $this->form['id'] ) ) {
220
+ $output .= ' id="' . $this->form['id'] . '"';
221
+ }
222
+
223
+ if ( count( $this->form['class'] ) > 0 ) {
224
+ $output .= $this->_output_classes( $this->form['class'] );
225
+ }
226
+
227
+ if ( $this->form['novalidate'] ) {
228
+ $output .= ' novalidate';
229
+ }
230
+
231
+ $output .= '>';
232
+ }
233
+
234
+ // Add honeypot anti-spam field
235
+ if ( $this->form['add_honeypot'] ) {
236
+ $this->add_input( 'Leave blank to submit', array(
237
+ 'name' => 'honeypot',
238
+ 'slug' => 'honeypot',
239
+ 'id' => 'form_honeypot',
240
+ 'wrap_tag' => 'div',
241
+ 'wrap_class' => array( 'form_field_wrap', 'hidden' ),
242
+ 'wrap_id' => '',
243
+ 'wrap_style' => 'display: none',
244
+ 'request_populate' => false
245
+ ) );
246
+ }
247
+
248
+ // Add a WordPress nonce field
249
+ if ( $this->form['add_nonce'] && function_exists( 'wp_create_nonce' ) ) {
250
+ $this->add_input( 'WordPress nonce', array(
251
+ 'value' => wp_create_nonce( $this->form['add_nonce'] ),
252
+ 'add_label' => false,
253
+ 'type' => 'hidden',
254
+ 'request_populate' => false
255
+ ) );
256
+ }
257
+
258
+ // Iterate through the input queue and add input HTML
259
+ foreach ( $this->inputs as $val ) :
260
+
261
+ $min_max_range = $element = $end = $attr = $field = $label_html = '';
262
+
263
+ // Automatic population of values using $_REQUEST data
264
+ if ( $val['request_populate'] && isset( $_REQUEST[ $val['name'] ] ) ) {
265
+
266
+ // Can this field be populated directly?
267
+ if ( ! in_array( $val['type'], array( 'html', 'title', 'radio', 'checkbox', 'select', 'submit' ) ) ) {
268
+ $val['value'] = $_REQUEST[ $val['name'] ];
269
+ }
270
+ }
271
+
272
+ // Automatic population for checkboxes and radios
273
+ if (
274
+ $val['request_populate'] &&
275
+ ( $val['type'] == 'radio' || $val['type'] == 'checkbox' ) &&
276
+ empty( $val['options'] )
277
+ ) {
278
+ $val['checked'] = isset( $_REQUEST[ $val['name'] ] ) ? true : $val['checked'];
279
+ }
280
+
281
+ switch ( $val['type'] ) {
282
+
283
+ case 'html':
284
+ $element = '';
285
+ $end = $val['label'];
286
+ break;
287
+
288
+ case 'title':
289
+ $element = '';
290
+ $end = '
291
+ <h3>' . $val['label'] . '</h3>';
292
+ break;
293
+
294
+ case 'textarea':
295
+ $element = 'textarea';
296
+ $end = ' class="form-control" placeholder="'.$val['placeholder'].'">' . $val['value'] . '</textarea>';
297
+ break;
298
+
299
+ case 'select':
300
+ $element = 'select';
301
+ $end .= '>';
302
+ foreach ( $val['options'] as $key => $opt ) {
303
+ $opt_insert = '';
304
+ if (
305
+ // Is this field set to automatically populate?
306
+ $val['request_populate'] &&
307
+
308
+ // Do we have $_REQUEST data to use?
309
+ isset( $_REQUEST[ $val['name'] ] ) &&
310
+
311
+ // Are we currently outputting the selected value?
312
+ $_REQUEST[ $val['name'] ] === $key
313
+ ) {
314
+ $opt_insert = ' selected';
315
+
316
+ // Does the field have a default selected value?
317
+ } else if ( $val['selected'] === $key ) {
318
+ $opt_insert = ' selected';
319
+ }
320
+ $end .= '<option value="' . $key . '"' . $opt_insert . '>' . $opt . '</option>';
321
+ }
322
+ $end .= '</select>';
323
+ break;
324
+ case 'captcha':
325
+ $element = 'div';
326
+ $end = ' class="g-recaptcha pirate-forms-g-recaptcha" data-sitekey="' .$val['value'] . '"></div>';
327
+ break;
328
+ case 'radio':
329
+ case 'checkbox':
330
+
331
+ // Special case for multiple check boxes
332
+ if ( count( $val['options'] ) > 0 ) :
333
+ $element = '';
334
+ foreach ( $val['options'] as $key => $opt ) {
335
+ $slug = $this->_make_slug( $opt );
336
+ $end .= sprintf(
337
+ '<input type="%s" name="%s[]" value="%s" id="%s"',
338
+ $val['type'],
339
+ $val['name'],
340
+ $key,
341
+ $slug
342
+ );
343
+ if (
344
+ // Is this field set to automatically populate?
345
+ $val['request_populate'] &&
346
+
347
+ // Do we have $_REQUEST data to use?
348
+ isset( $_REQUEST[ $val['name'] ] ) &&
349
+
350
+ // Is the selected item(s) in the $_REQUEST data?
351
+ in_array( $key, $_REQUEST[ $val['name'] ] )
352
+ ) {
353
+ $end .= ' checked';
354
+ }
355
+ $end .= $this->field_close();
356
+ $end .= ' <label for="' . $slug . '">' . $opt . '</label>';
357
+ }
358
+ $label_html = '<div class="checkbox_header">' . $val['label'] . '</div>';
359
+ break;
360
+ endif;
361
+ case 'submit':
362
+ $element = 'button';
363
+ $end .= ' class="" type="' . $val['type'] . '">' . $val['value'] . '</button>';
364
+ break;
365
+ default :
366
+ $element = 'input';
367
+ $end .= ' class="form-control" type="' . $val['type'] . '" value="' . $val['value'] . '" placeholder="'.$val['placeholder'].'"';
368
+ $end .= $val['checked'] ? ' checked' : '';
369
+ $end .= $this->field_close();
370
+ break;
371
+
372
+ }
373
+
374
+ // Added a submit button, no need to auto-add one
375
+ if ( $val['type'] === 'submit' ) {
376
+ $this->has_submit = true;
377
+ }
378
+
379
+ // Special number values for range and number types
380
+ if ( $val['type'] === 'range' || $val['type'] === 'number' ) {
381
+ $min_max_range .= ! empty( $val['min'] ) ? ' min="' . $val['min'] . '"' : '';
382
+ $min_max_range .= ! empty( $val['max'] ) ? ' max="' . $val['max'] . '"' : '';
383
+ $min_max_range .= ! empty( $val['step'] ) ? ' step="' . $val['step'] . '"' : '';
384
+ }
385
+
386
+ // Add an ID field, if one is present
387
+ $id = ! empty( $val['id'] ) ? ' id="' . $val['id'] . '"' : '';
388
+
389
+ // Output classes
390
+ $class = $this->_output_classes( $val['class'] );
391
+
392
+ // Special HTML5 fields, if set
393
+ $attr .= $val['autofocus'] ? ' autofocus' : '';
394
+ $attr .= $val['checked'] ? ' checked' : '';
395
+ $attr .= $val['required'] ? ' required' : '';
396
+
397
+ // Build the label
398
+ if ( ! empty( $label_html ) ) {
399
+ $field .= $label_html;
400
+ } elseif ( $val['add_label'] && ! in_array( $val['type'], array( 'hidden', 'submit', 'title', 'html', 'textarea', 'captcha' ) ) ) {
401
+ $field .= '<label for="' . $val['id'] . '">' . $val['label'] . '</label>';
402
+ }
403
+
404
+ // An $element was set in the $val['type'] switch statement above so use that
405
+ if ( ! empty( $element ) ) {
406
+ if ( $val['type'] === 'checkbox' ) {
407
+ $field = '
408
+ <' . $element . $id . ' name="' . $val['name'] . '"' . $min_max_range . $class . $attr . $end .
409
+ $field;
410
+ } else {
411
+ $field .= '
412
+ <' . $element . $id . ' name="' . $val['name'] . '"' . $min_max_range . $class . $attr . $end;
413
+ }
414
+ // Not a form element
415
+ } else {
416
+ $field .= $end;
417
+ }
418
+
419
+ // Parse and create wrap, if needed
420
+ if ( $val['type'] != 'hidden' && $val['type'] != 'html' ) :
421
+
422
+ $wrap_before = $val['before_html'];
423
+ if ( ! empty( $val['wrap_tag'] ) ) {
424
+ $wrap_before .= '<' . $val['wrap_tag'];
425
+ $wrap_before .= count( $val['wrap_class'] ) > 0 ? $this->_output_classes( $val['wrap_class'] ) : '';
426
+ $wrap_before .= ! empty( $val['wrap_style'] ) ? ' style="' . $val['wrap_style'] . '"' : '';
427
+ $wrap_before .= ! empty( $val['wrap_id'] ) ? ' id="' . $val['wrap_id'] . '"' : '';
428
+ $wrap_before .= '>';
429
+ }
430
+
431
+ $wrap_after = $val['after_html'];
432
+ if ( ! empty( $val['wrap_tag'] ) ) {
433
+ $wrap_after = '</' . $val['wrap_tag'] . '>' . $wrap_after;
434
+ }
435
+
436
+ $output .= $wrap_before . $field . $wrap_after;
437
+ else :
438
+ $output .= $field;
439
+ endif;
440
+
441
+ endforeach;
442
+
443
+ // Auto-add submit button
444
+ if ( ! $this->has_submit && $this->form['add_submit'] ) {
445
+ $output .= '<div class="form_field_wrap"><input type="submit" value="Submit" name="submit"></div>';
446
+ }
447
+
448
+ // Close the form tag if one was added
449
+ if ( $this->form['form_element'] ) {
450
+ $output .= '</form>';
451
+ }
452
+
453
+ // Output or return?
454
+ if ( $echo ) {
455
+ echo $output;
456
+ } else {
457
+ return $output;
458
+ }
459
+ }
460
+
461
+ // Easy way to auto-close fields, if necessary
462
+ function field_close() {
463
+ return $this->form['markup'] === 'xhtml' ? ' />' : '>';
464
+ }
465
+
466
+ // Validates id and class attributes
467
+ // TODO: actually validate these things
468
+ private function _check_valid_attr( $string ) {
469
+
470
+ $result = true;
471
+
472
+ // Check $name for correct characters
473
+ // "^[a-zA-Z0-9_-]*$"
474
+
475
+ return $result;
476
+
477
+ }
478
+
479
+ // Create a slug from a label name
480
+ private function _make_slug( $string ) {
481
+
482
+ $result = '';
483
+
484
+ $result = str_replace( '"', '', $string );
485
+ $result = str_replace( "'", '', $result );
486
+ $result = str_replace( '_', '-', $result );
487
+ $result = preg_replace( '~[\W\s]~', '-', $result );
488
+
489
+ $result = strtolower( $result );
490
+
491
+ return $result;
492
+
493
+ }
494
+
495
+ // Parses and builds the classes in multiple places
496
+ private function _output_classes( $classes ) {
497
+
498
+ $output = '';
499
+
500
+
501
+ if ( is_array( $classes ) && count( $classes ) > 0 ) {
502
+ $output .= ' class="';
503
+ foreach ( $classes as $class ) {
504
+ $output .= $class . ' ';
505
+ }
506
+ $output .= '"';
507
+ } else if ( is_string( $classes ) ) {
508
+ $output .= ' class="' . $classes . '"';
509
+ }
510
+
511
+ return $output;
512
+ }
513
+ }
inc/helpers.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**************************************************/
4
+ /**************** Show errors *********************/
5
+ /**************************************************/
6
+
7
+ if ( ! function_exists( 'pirate_forms_display_errors' ) ) {
8
+
9
+ function pirate_forms_display_errors( $errs ) {
10
+
11
+ $output = '';
12
+
13
+ if( !empty($errs) ):
14
+
15
+ $output .= '<div class="pirate_forms_error_box">';
16
+ $output .= '<p>'.__( 'Sorry, an error occured.','pirate-forms' ).'</p>';
17
+ $output .= '</div>';
18
+ foreach ( $errs as $err ) :
19
+ $output .= '<div class="pirate_forms_error_box">';
20
+ $output .= "<p>$err</p>";
21
+ $output .= '</div>';
22
+ endforeach;
23
+
24
+ endif;
25
+
26
+ return $output;
27
+ }
28
+ }
29
+
30
+ /***************************************************************************/
31
+ /******** Get blacklist IPs and emails from the Discussion settings ********/
32
+ /***************************************************************************/
33
+
34
+ if ( ! function_exists( 'pirate_forms_get_blacklist' ) ) {
35
+
36
+ function pirate_forms_get_blacklist() {
37
+
38
+ $final_blocked_arr = array();
39
+
40
+ $blocked = get_option( 'blacklist_keys' );
41
+ $blocked = str_replace( "\r", "\n", $blocked );
42
+
43
+ $blocked_arr = explode( "\n", $blocked );
44
+ $blocked_arr = array_map( 'trim', $blocked_arr );
45
+
46
+ foreach ( $blocked_arr as $ip_or_email ) {
47
+ $ip_or_email = trim( $ip_or_email );
48
+ if (
49
+ filter_var( $ip_or_email, FILTER_VALIDATE_IP ) ||
50
+ filter_var( $ip_or_email, FILTER_VALIDATE_EMAIL )
51
+ ) {
52
+ $final_blocked_arr[] = $ip_or_email;
53
+ }
54
+ }
55
+
56
+ return $final_blocked_arr;
57
+ }
58
+ }
inc/settings.php ADDED
@@ -0,0 +1,580 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ *
4
+ * OPTIONS
5
+ * @since 1.0.0
6
+ * name; id; desc; type; default; options
7
+ *
8
+ */
9
+ function pirate_forms_plugin_options() {
10
+
11
+ /*********************************************************/
12
+ /************ Default values from Zerif Lite ************/
13
+ /*********************************************************/
14
+
15
+ $zerif_contactus_sitekey = get_theme_mod('zerif_contactus_sitekey');
16
+
17
+ if( !empty($zerif_contactus_sitekey) ):
18
+ $pirate_forms_contactus_sitekey = $zerif_contactus_sitekey;
19
+ else:
20
+ $pirate_forms_contactus_sitekey = '';
21
+ endif;
22
+
23
+ $zerif_contactus_secretkey = get_theme_mod('zerif_contactus_secretkey');
24
+ if( !empty($zerif_contactus_secretkey) ):
25
+ $pirate_forms_contactus_secretkey = $zerif_contactus_secretkey;
26
+ else:
27
+ $pirate_forms_contactus_secretkey = '';
28
+ endif;
29
+
30
+ $zerif_contactus_recaptcha_show = get_theme_mod('zerif_contactus_recaptcha_show');
31
+
32
+ if( isset($zerif_contactus_recaptcha_show) && ($zerif_contactus_recaptcha_show == '1') ):
33
+ $pirate_forms_contactus_recaptcha_show = '';
34
+ else:
35
+ $pirate_forms_contactus_recaptcha_show = 'yes';
36
+ endif;
37
+
38
+ $zerif_contactus_button_label = get_theme_mod('zerif_contactus_button_label',__('Send Message','zerif-lite'));
39
+ if( !empty($zerif_contactus_button_label) ):
40
+ $pirate_forms_contactus_button_label = $zerif_contactus_button_label;
41
+ else:
42
+ $pirate_forms_contactus_button_label = __( 'Send Message','pirate-forms' );
43
+ endif;
44
+
45
+ $zerif_contactus_email = get_theme_mod('zerif_contactus_email');
46
+ $zerif_email = get_theme_mod('zerif_email');
47
+
48
+ $pirate_forms_contactus_email = '';
49
+ if( !empty($zerif_contactus_email) ):
50
+ $pirate_forms_contactus_email = $zerif_contactus_email;
51
+ elseif( !empty($zerif_email) ):
52
+ $pirate_forms_contactus_email = $zerif_email;
53
+ endif;
54
+
55
+ return array(
56
+ 'first_tab' => array(
57
+ 'header_fields' => array(
58
+ __( 'Fields','pirate-forms' ),
59
+ '',
60
+ 'title',
61
+ '',
62
+ ),
63
+ /* Name */
64
+ 'pirateformsopt_name_field' => array(
65
+ __( 'Name','pirate-forms' ),
66
+ __( 'Do you want the name field to be displayed?','pirate-forms' ),
67
+ 'select',
68
+ 'req',
69
+ array(
70
+ '' => __( 'None','pirate-forms' ),
71
+ 'yes' => __( 'Yes but not required','pirate-forms' ),
72
+ 'req' => __( 'Required','pirate-forms' ),
73
+ ),
74
+ ),
75
+ /* Email */
76
+ 'pirateformsopt_email_field' => array(
77
+ __( 'Email address','pirate-forms' ),
78
+ __( 'Do you want the email address field be displayed?','pirate-forms' ),
79
+ 'select',
80
+ 'req',
81
+ array(
82
+ '' => __( 'None','pirate-forms' ),
83
+ 'yes' => __( 'Yes but not required','pirate-forms' ),
84
+ 'req' => __( 'Required','pirate-forms' ),
85
+ ),
86
+ ),
87
+ /* Subject */
88
+ 'pirateformsopt_subject_field' => array(
89
+ __( 'Subject','pirate-forms' ),
90
+ __( 'Do you want the subject field be displayed?','pirate-forms' ),
91
+ 'select',
92
+ 'req',
93
+ array(
94
+ '' => __( 'None','pirate-forms' ),
95
+ 'yes' => __( 'Yes but not required','pirate-forms' ),
96
+ 'req' => __( 'Required','pirate-forms' ),
97
+ ),
98
+ ),
99
+ /* Message */
100
+ 'pirateformsopt_message_field' => array(
101
+ __( 'Message','pirate-forms' ),
102
+ '',
103
+ 'select',
104
+ 'req',
105
+ array(
106
+ '' => __( 'None','pirate-forms' ),
107
+ 'yes' => __( 'Yes but not required','pirate-forms' ),
108
+ 'req' => __( 'Required','pirate-forms' ),
109
+ ),
110
+ ),
111
+ /* Recaptcha */
112
+ 'pirateformsopt_recaptcha_field' => array(
113
+ __( 'Add a reCAPTCHA','pirate-forms' ),
114
+ '',
115
+ 'checkbox',
116
+ $pirate_forms_contactus_recaptcha_show,
117
+ ),
118
+ /* Site key */
119
+ 'pirateformsopt_recaptcha_sitekey' => array(
120
+ __( 'Site key','pirate-forms' ),
121
+ '<a href="https://www.google.com/recaptcha/admin#list" target="_blank">'.__( 'Create an account here ','pirate-forms' ).'</a>'.__( 'to get the Site key and the Secret key for the reCaptcha.','pirate-forms' ),
122
+ 'text',
123
+ $pirate_forms_contactus_sitekey,
124
+ ),
125
+ /* Secret key */
126
+ 'pirateformsopt_recaptcha_secretkey' => array(
127
+ __( 'Secret key','pirate-forms' ),
128
+ '',
129
+ 'text',
130
+ $pirate_forms_contactus_secretkey,
131
+ ),
132
+
133
+ ),
134
+ 'second_tab' => array(
135
+ 'header_labels' => array(
136
+ __( 'Labels','pirate-forms' ),
137
+ '',
138
+ 'title',
139
+ '',
140
+ ),
141
+ 'pirateformsopt_label_name' => array(
142
+ __( 'Name','pirate-forms' ),
143
+ '',
144
+ 'text',
145
+ __( 'Your Name','pirate-forms' ),
146
+ ),
147
+ 'pirateformsopt_label_email' => array(
148
+ __( 'Email','pirate-forms' ),
149
+ '',
150
+ 'text',
151
+ __( 'Your Email','pirate-forms' )
152
+ ),
153
+ 'pirateformsopt_label_subject' => array(
154
+ __( 'Subject','pirate-forms' ),
155
+ '',
156
+ 'text',
157
+ __( 'Subject','pirate-forms' )
158
+ ),
159
+ 'pirateformsopt_label_message' => array(
160
+ __( 'Message','pirate-forms' ),
161
+ '',
162
+ 'text',
163
+ __( 'Your message','pirate-forms' )
164
+ ),
165
+ 'pirateformsopt_label_submit_btn' => array(
166
+ __( 'Submit button','pirate-forms' ),
167
+ '',
168
+ 'text',
169
+ $pirate_forms_contactus_button_label
170
+ )
171
+ ),
172
+ 'third_tab' => array(
173
+ 'header_messages' => array(
174
+ __( 'Messages','pirate-forms' ),
175
+ '',
176
+ 'title',
177
+ '',
178
+ ),
179
+ 'pirateformsopt_label_err_name' => array(
180
+ __( 'Name required and missing','pirate-forms' ),
181
+ '',
182
+ 'text',
183
+ __( 'Enter your name','pirate-forms' )
184
+ ),
185
+ 'pirateformsopt_label_err_email' => array(
186
+ __( 'E-mail required and missing','pirate-forms' ),
187
+ '',
188
+ 'text',
189
+ __( 'Enter a valid email','pirate-forms' )
190
+ ),
191
+ 'pirateformsopt_label_err_subject' => array(
192
+ __( 'Subject required and missing','pirate-forms' ),
193
+ '',
194
+ 'text',
195
+ __( 'Please enter a subject','pirate-forms' )
196
+ ),
197
+ 'pirateformsopt_label_err_no_content' => array(
198
+ __( 'Question/comment is missing','pirate-forms' ),
199
+ '',
200
+ 'text',
201
+ __( 'Enter your question or comment','pirate-forms' )
202
+ ),
203
+ 'pirateformsopt_label_submit' => array(
204
+ __( 'Successful form submission text','pirate-forms' ),
205
+ __( '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' ),
206
+ 'text',
207
+ __( 'Thanks, your email was sent successfully!','pirate-forms' )
208
+ )
209
+ ),
210
+ 'fourth_tab' => array(
211
+ 'header_options' => array(
212
+ __( 'Form processing options','pirate-forms' ),
213
+ '',
214
+ 'title',
215
+ '',
216
+ ),
217
+ 'pirateformsopt_email' => array(
218
+ __( 'Contact notification sender email','pirate-forms' ),
219
+ __( 'Email to use for the sender of the contact form emails both to the recipients below and the contact form submitter (if this is activated below). The domain for this email address should match your site\'s domain.',
220
+ 'email','pirate-forms' ),
221
+ 'text',
222
+ $pirate_forms_contactus_email
223
+ ),
224
+ 'pirateformsopt_reply_to_admin' => array(
225
+ __( 'Use the email address above as notification sender','pirate-forms' ),
226
+ __( 'When this is on, the notification emails sent from your site will come from the email address above. When this is off, the emails will come from the form submitter, making it easy to reply. If you are not receiving notifications from the site, then turn this option off as your email server might be marking them as spam.','pirate-forms' ),
227
+ 'checkbox',
228
+ '',
229
+ ),
230
+ 'pirateformsopt_email_recipients' => array(
231
+ __( 'Contact submission recipients','pirate-forms' ),
232
+ __( 'Email address(es) to receive contact submission notifications. You can separate multiple emails with a comma.','pirate-forms' ),
233
+ 'text',
234
+ pirate_forms_get_key( 'pirateformsopt_email' ) ? pirate_forms_get_key( 'pirateformsopt_email' ) : $pirate_forms_contactus_email
235
+ ),
236
+ 'pirateformsopt_store' => array(
237
+ __( 'Store submissions in the database','pirate-forms' ),
238
+ __( 'Should the submissions be stored in the admin area? If chosen, contact form submissions will be saved in Contacts on the left (appears after this option is activated).','pirate-forms' ),
239
+ 'checkbox',
240
+ '',
241
+ ),
242
+ 'pirateformsopt_blacklist' => array(
243
+ __( 'Use the comments blacklist to restrict submissions','pirate-forms' ),
244
+ __( 'Should form submission IP and email addresses be compared against the Comment Blacklist, found in','pirate-forms').'<strong>'.__('wp-admin > Settings > Discussion > Comment Blacklist?','pirate-forms').'</strong>',
245
+ 'checkbox',
246
+ 'yes',
247
+ ),
248
+ 'pirateformsopt_confirm_email' => array(
249
+ __( 'Send email confirmation to form submitter','pirate-forms' ),
250
+ __( 'Adding text here will send an email to the form submitter. The email uses the "Text to show when form is submitted..." field below as the subject line. Plain text only here, no HTML.','pirate-forms' ),
251
+ 'text',
252
+ '',
253
+ )
254
+ ),
255
+ 'fifth_tab' => array(
256
+ 'pirateformsopt_use_smtp' => array(
257
+ __( 'Use SMTP to send emails?','pirate-forms' ),
258
+ __( 'Instead of PHP mail function','pirate-forms' ),
259
+ 'checkbox',
260
+ '',
261
+ ),
262
+ 'pirateformsopt_smtp_host' => array(
263
+ __( 'SMTP Host','pirate-forms' ),
264
+ '',
265
+ 'text',
266
+ '',
267
+ ),
268
+ 'pirateformsopt_smtp_port' => array(
269
+ __( 'SMTP Port','pirate-forms' ),
270
+ '',
271
+ 'text',
272
+ '',
273
+ ),
274
+ 'pirateformsopt_use_smtp_authentication' => array(
275
+ __( 'Use SMTP Authentication?','pirate-forms' ),
276
+ __( 'If you check this box, make sure the SMTP Username and SMTP Password are completed.','pirate-forms' ),
277
+ 'checkbox',
278
+ 'yes',
279
+ ),
280
+ 'pirateformsopt_smtp_username' => array(
281
+ __( 'SMTP Username','pirate-forms' ),
282
+ '',
283
+ 'text',
284
+ '',
285
+ ),
286
+ 'pirateformsopt_smtp_password' => array(
287
+ __( 'SMTP Password','pirate-forms' ),
288
+ '',
289
+ 'text',
290
+ '',
291
+ )
292
+ )
293
+ );
294
+ }
295
+
296
+ /*
297
+ *
298
+ * Add page to the dashbord menu
299
+ * @since 1.0.0
300
+ */
301
+ function pirate_forms_add_to_admin() {
302
+
303
+ add_submenu_page(
304
+ 'options-general.php',
305
+ __( 'Pirate Forms settings', 'pirate-forms' ),
306
+ __( 'Pirate Forms', 'pirate-forms' ),
307
+ 'manage_options',
308
+ 'pirate-forms-admin',
309
+ 'pirate_forms_admin' );
310
+
311
+ }
312
+ add_action( 'admin_menu', 'pirate_forms_add_to_admin' );
313
+
314
+ /*
315
+ *
316
+ * Save forms via Ajax
317
+ * @since 1.0.0
318
+ *
319
+ */
320
+ add_action('wp_ajax_pirate_forms_save', 'pirate_forms_save_callback');
321
+ add_action('wp_ajax_nopriv_pirate_forms_save', 'pirate_forms_save_callback');
322
+
323
+ function pirate_forms_save_callback() {
324
+
325
+ if( isset($_POST['dataSent']) ):
326
+ $dataSent = $_POST['dataSent'];
327
+
328
+ $params = array();
329
+
330
+ if( !empty($dataSent) ):
331
+ parse_str( $dataSent, $params );
332
+ endif;
333
+
334
+ if( !empty($params) ):
335
+
336
+ update_option( 'pirate_forms_settings_array', $params );
337
+
338
+ $pirate_forms_zerif_lite_mods = get_option('theme_mods_zerif-lite');
339
+
340
+ if( empty($pirate_forms_zerif_lite_mods) ):
341
+ $pirate_forms_zerif_lite_mods = array();
342
+ endif;
343
+
344
+ if( isset($params['pirateformsopt_label_submit_btn']) ):
345
+ $pirate_forms_zerif_lite_mods['zerif_contactus_button_label'] = $params['pirateformsopt_label_submit_btn'];
346
+ endif;
347
+
348
+ if( isset($params['pirateformsopt_email']) ):
349
+ $pirate_forms_zerif_lite_mods['zerif_contactus_email'] = $params['pirateformsopt_email'];
350
+ endif;
351
+
352
+ if( isset($params['pirateformsopt_email_recipients']) ):
353
+ $pirate_forms_zerif_lite_mods['zerif_contactus_email'] = $params['pirateformsopt_email_recipients'];
354
+ endif;
355
+
356
+ if( isset($params['pirateformsopt_recaptcha_field']) && ($params['pirateformsopt_recaptcha_field'] == 'yes') ):
357
+ $pirate_forms_zerif_lite_mods['zerif_contactus_recaptcha_show'] = 0;
358
+ else:
359
+ $pirate_forms_zerif_lite_mods['zerif_contactus_recaptcha_show'] = 1;
360
+ endif;
361
+
362
+ if( isset($params['pirateformsopt_recaptcha_sitekey']) ):
363
+ $pirate_forms_zerif_lite_mods['zerif_contactus_sitekey'] = $params['pirateformsopt_recaptcha_sitekey'];
364
+ endif;
365
+
366
+ if( isset($params['pirateformsopt_recaptcha_secretkey']) ):
367
+ $pirate_forms_zerif_lite_mods['zerif_contactus_secretkey'] = $params['pirateformsopt_recaptcha_secretkey'];
368
+ endif;
369
+
370
+ update_option('theme_mods_zerif-lite', $pirate_forms_zerif_lite_mods);
371
+
372
+
373
+
374
+ endif;
375
+
376
+ endif;
377
+
378
+ die();
379
+
380
+ }
381
+
382
+ /*
383
+ * Admin area setting page for the plugin
384
+ * @since 1.0.0
385
+ *
386
+ */
387
+ function pirate_forms_admin() {
388
+
389
+ global $current_user;
390
+
391
+ $pirate_forms_options = get_option( 'pirate_forms_settings_array' );
392
+
393
+ $plugin_options = pirate_forms_plugin_options();
394
+ ?>
395
+
396
+ <div class="wrap">
397
+
398
+ <h1><?php esc_html_e( 'Pirate Forms','pirate-forms' ); ?></h1>
399
+
400
+
401
+
402
+ <ul class="pirate-forms-nav-tabs" role="tablist">
403
+ <li role="presentation" class="active"><a href="#0" aria-controls="how_to_use" role="tab" data-toggle="tab"><?php esc_html_e( 'How to use','pirate-forms'); ?></a></li>
404
+ <li role="presentation"><a href="#1" aria-controls="fields" role="tab" data-toggle="tab"><?php esc_html_e( 'Fields','pirate-forms'); ?></a></li>
405
+ <li role="presentation"><a href="#2" aria-controls="labels" role="tab" data-toggle="tab"><?php esc_html_e( 'Labels','pirate-forms'); ?></a></li>
406
+ <li role="presentation"><a href="#3" aria-controls="messages" role="tab" data-toggle="tab"><?php esc_html_e( 'Messages','pirate-forms'); ?></a></li>
407
+ <li role="presentation"><a href="#4" aria-controls="options" role="tab" data-toggle="tab"><?php esc_html_e( 'Options','pirate-forms'); ?></a></li>
408
+ <li role="presentation"><a href="#5" aria-controls="smtp" role="tab" data-toggle="tab"><?php esc_html_e( 'SMTP','pirate-forms'); ?></a></li>
409
+ </ul>
410
+
411
+ <div class="pirate-forms-tab-content">
412
+
413
+ <div id="0" class="pirate-forms-tab-pane active">
414
+
415
+ <p><?php esc_html_e( 'Welcome to Pirate Forms!','pirate-forms' ); ?><p>
416
+ <p><?php esc_html_e( 'To get started, just configure all the options you need, hit save and start using the created form.','pirate-forms' ); ?><p>
417
+
418
+ <hr>
419
+
420
+ <p><?php esc_html_e( 'There are 3 ways of using the newly created form:','pirate-forms' ); ?><p>
421
+ <p><?php esc_html_e( '1. Use the shortcode ','pirate-forms' ); ?><code>[pirate_forms] </code><?php esc_html_e( 'in any page or post.','pirate-forms' ); ?><p>
422
+ <p><?php esc_html_e( '2. Add a ','pirate-forms' ); ?><a href="<?php echo admin_url( 'widgets.php' ); ?>"><?php esc_html_e( 'widget','pirate-forms' ); ?></a><p>
423
+ <p><?php esc_html_e( '3. Use the shortcode ','pirate-forms' ); ?><code>&lt;?php echo do_shortcode( '[pirate_forms]' ) ?&gt;</code><?php esc_html_e( 'in the theme\'s files.','pirate-forms' ); ?><p>
424
+
425
+ </div>
426
+
427
+ <?php
428
+
429
+ $pirate_forms_nr_tabs = 1;
430
+
431
+ foreach ( $plugin_options as $plugin_options_tab ) :
432
+
433
+ echo '<div id="'.$pirate_forms_nr_tabs.'" class="pirate-forms-tab-pane">';
434
+
435
+ ?>
436
+ <form method="post" class="pirate_forms_contact_settings">
437
+
438
+ <?php
439
+ $pirate_forms_nr_tabs++;
440
+ foreach ( $plugin_options_tab as $key => $value ) :
441
+
442
+ /* Label */
443
+ if( !empty($value[0]) ):
444
+ $opt_name = $value[0];
445
+ endif;
446
+
447
+ /* ID */
448
+ $opt_id = $key;
449
+
450
+ /* Description */
451
+ if( !empty($value[1]) ):
452
+ $opt_desc = $value[1];
453
+ else:
454
+ $opt_desc = '';
455
+ endif;
456
+
457
+ /* Input type */
458
+ if( !empty($value[2]) ):
459
+ $opt_type = $value[2];
460
+ else:
461
+ $opt_type = '';
462
+ endif;
463
+
464
+ /* Default value */
465
+ if( !empty($value[3]) ):
466
+ $opt_default = $value[3];
467
+ else:
468
+ $opt_default = '';
469
+ endif;
470
+
471
+ /* Value */
472
+ $opt_val = isset( $pirate_forms_options[$opt_id] ) ? $pirate_forms_options[$opt_id] : $opt_default;
473
+
474
+ /* Options if checkbox, select, or radio */
475
+ $opt_options = empty( $value[4] ) ? array() : $value[4];
476
+
477
+ switch ($opt_type) {
478
+ case "title":
479
+
480
+ if( !empty($opt_name) ):
481
+ echo '<h3 class="title">'.$opt_name.'</h3><hr />';
482
+ endif;
483
+
484
+ break;
485
+
486
+ case "text":
487
+ ?>
488
+
489
+ <div class="pirate-forms-grouped">
490
+ <label for="<?php echo $opt_id ?>"><?php echo $opt_name.'<br>'.'<span>'.$opt_desc.'</span>'; ?></label>
491
+ <input name="<?php echo $opt_id; ?>" id="<?php echo $opt_id ?>" type="<?php echo $opt_type; ?>" value="<?php echo stripslashes( $opt_val ); ?>" class="widefat">
492
+ </div>
493
+
494
+ <?php
495
+ break;
496
+ case "select":
497
+ ?>
498
+ <div class="pirate-forms-grouped">
499
+
500
+ <label for="<?php echo $opt_id ?>"><?php echo $opt_name.'<br>'.'<span>'.$opt_desc.'</span>'; ?></label>
501
+
502
+ <select name="<?php echo $opt_id ?>" id="<?php echo $opt_id; ?>">
503
+ <?php
504
+ foreach ( $opt_options as $key => $val ) :
505
+
506
+ $selected = '';
507
+ if ( $opt_val == $key )
508
+ $selected = 'selected';
509
+ ?>
510
+ <option value="<?php echo $key ?>" <?php echo $selected; ?>><?php echo $val; ?></option>
511
+ <?php endforeach; ?>
512
+ </select>
513
+
514
+
515
+ </div>
516
+
517
+ <?php
518
+ break;
519
+ case "checkbox":
520
+ ?>
521
+ <div class="pirate-forms-grouped">
522
+ <label for="<?php echo $opt_id; ?>"><?php echo $opt_name.'<br>'.'<span>'.$opt_desc.'</span>'; ?></label>
523
+
524
+ <?php
525
+
526
+ $checked = '';
527
+ if ( $opt_val == 'yes' )
528
+ $checked = 'checked';
529
+ ?>
530
+
531
+ <input type="checkbox" value="yes" name="<?php echo $opt_id; ?>" id="<?php echo $opt_id; ?>" <?php echo $checked; ?>>Yes
532
+
533
+ </div>
534
+
535
+
536
+ <?php
537
+ break;
538
+ }
539
+
540
+ endforeach;
541
+ ?>
542
+ <input name="save" type="submit" value="<?php _e( 'Save changes', 'pirate-forms' ) ?>" class="button-primary pirate-forms-save-button">
543
+ <input type="hidden" name="action" value="save">
544
+ <input type="hidden" name="proper_nonce" value="<?php echo wp_create_nonce( $current_user->user_email ) ?>">
545
+
546
+ </form><!-- .pirate_forms_contact_settings -->
547
+ <div class="ajaxAnimation"></div>
548
+ </div><!-- .pirate-forms-tab-pane -->
549
+
550
+ <?php endforeach; ?>
551
+
552
+ </div><!-- .pirate-forms-tab-content -->
553
+
554
+
555
+ </div><!-- .wrap -->
556
+
557
+ <?php
558
+ }
559
+
560
+ /***********************************************************/
561
+ /*********** Save default options if none exist ***********/
562
+ /**********************************************************/
563
+
564
+ function pirate_forms_settings_init() {
565
+
566
+ if ( ! get_option( 'pirate_forms_settings_array' ) ) {
567
+
568
+ $new_opt = array();
569
+ foreach ( pirate_forms_plugin_options() as $temparr ) {
570
+ foreach ($temparr as $key => $opt) {
571
+ $new_opt[$key] = $opt[3];
572
+ }
573
+ }
574
+
575
+ update_option( 'pirate_forms_settings_array', $new_opt );
576
+
577
+ }
578
+ }
579
+
580
+ add_action( 'admin_head', 'pirate_forms_settings_init' );
inc/widget.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Template for new WordPress widget
4
+ *
5
+ * @see WP_Widget::widget()
6
+ */
7
+ class pirate_forms_contact_widget extends WP_Widget {
8
+
9
+ /**
10
+ * Widget constructor
11
+ */
12
+ public function __construct() {
13
+ parent::__construct(
14
+ 'pirate_forms_contact_widget',
15
+ __( 'Pirate Forms', 'pirate-forms' ),
16
+ array( 'classname' => __FUNCTION__, 'description' => __( 'Pirate Forms','pirate-forms') )
17
+ );
18
+ }
19
+
20
+ /**
21
+ * Widget logic and display
22
+ *
23
+ * @param array $args
24
+ * @param array $instance
25
+ */
26
+ function widget( $args, $instance ) {
27
+
28
+ // Pulling out all settings
29
+ extract( $args );
30
+ extract( $instance );
31
+
32
+ // Output all wrappers
33
+ echo $before_widget . '<div class="pirate-forms-contact-widget">';
34
+
35
+ if ( ! empty( $pirate_forms_widget_title ) )
36
+ echo $before_title . $pirate_forms_widget_title . $after_title;
37
+
38
+ if ( ! empty( $pirate_forms_widget_subtext ) )
39
+ echo wpautop( stripslashes( $pirate_forms_widget_subtext ) );
40
+
41
+ echo do_shortcode('[pirate_forms]');
42
+
43
+ echo '</div>' . $after_widget;
44
+
45
+ }
46
+
47
+ /**
48
+ * Used to update widget settings
49
+ *
50
+ * @param array $new_instance
51
+ * @param array $old_instance
52
+ *
53
+ * @return array
54
+ */
55
+ function update( $new_instance, $old_instance ) {
56
+ $instance = $old_instance;
57
+
58
+ // Storing widget title as inputted option or category name
59
+ $instance['pirate_forms_widget_title'] = apply_filters( 'widget_title', sanitize_text_field( $new_instance['pirate_forms_widget_title'] ) );
60
+
61
+ $instance['pirate_forms_widget_subtext'] = $new_instance['pirate_forms_widget_subtext'];
62
+
63
+ return $instance;
64
+ }
65
+
66
+ /**
67
+ * Used to generate the widget admin view
68
+ *
69
+ * @param array $instance
70
+ *
71
+ * @return string|void
72
+ */
73
+ function form( $instance ) {
74
+
75
+ $pirate_forms_widget_title = ! empty( $instance['pirate_forms_widget_title'] ) ? $instance['pirate_forms_widget_title'] : __( 'Title','pirate-forms' );
76
+ $pirate_forms_widget_subtext = ! empty( $instance['pirate_forms_widget_subtext'] ) ? $instance['pirate_forms_widget_subtext'] : __( 'Text above form','pirate-forms' );
77
+ ?>
78
+ <p>
79
+ <label for="<?php echo $this->get_field_id( 'pirate_forms_widget_title' ); ?>"><?php _e( 'Title:' ); ?></label>
80
+ <input class="widefat" id="<?php echo $this->get_field_id( 'pirate_forms_widget_title' ); ?>" name="<?php echo $this->get_field_name( 'pirate_forms_widget_title' ); ?>" type="text" value="<?php echo esc_attr( $pirate_forms_widget_title ); ?>">
81
+ </p>
82
+ <p>
83
+ <label for="<?php echo $this->get_field_id( 'pirate_forms_widget_subtext' ); ?>"><?php _e( 'Subtext:' ); ?></label>
84
+ <textarea class="widefat" id="<?php echo $this->get_field_id( 'pirate_forms_widget_subtext' ); ?>" name="<?php echo $this->get_field_name( 'pirate_forms_widget_subtext' ); ?>"><?php echo esc_attr( $pirate_forms_widget_subtext ); ?></textarea>
85
+ </p>
86
+ <?php
87
+
88
+ }
89
+ }
90
+
91
+ add_action( 'widgets_init', create_function( '', 'return register_widget("pirate_forms_contact_widget");' ) );
js/scripts-admin.js ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function() {
2
+ jQuery(".pirate-forms-nav-tabs a").click(function (event) {
3
+ event.preventDefault();
4
+ jQuery(this).parent().addClass("active");
5
+ jQuery(this).parent().siblings().removeClass("active");
6
+ var tab = jQuery(this).attr("href");
7
+ jQuery(".pirate-forms-tab-pane").not(tab).css("display", "none");
8
+ jQuery(tab).fadeIn();
9
+ });
10
+
11
+ jQuery(".pirate-forms-save-button").click(function (e) {
12
+ e.preventDefault();
13
+ cwpTopUpdateForm();
14
+ return false;
15
+ });
16
+ function cwpTopUpdateForm() {
17
+
18
+ startAjaxIntro();
19
+
20
+ var data = jQuery(".pirate_forms_contact_settings").serialize();
21
+
22
+ jQuery.ajax({
23
+ type: "POST",
24
+ url: cwp_top_ajaxload.ajaxurl,
25
+
26
+ data: {
27
+ action: "pirate_forms_save",
28
+ dataSent: data
29
+ },
30
+ success: function (response) {
31
+ console.log(response);
32
+ },
33
+ error: function (MLHttpRequest, textStatus, errorThrown) {
34
+ console.log("There was an error: " + errorThrown);
35
+ }
36
+ });
37
+
38
+ endAjaxIntro();
39
+ return false;
40
+ }
41
+
42
+ // Starting the AJAX intro animation
43
+ function startAjaxIntro() {
44
+ jQuery(".ajaxAnimation").fadeIn();
45
+ }
46
+
47
+ // Ending the AJAX intro animation
48
+ function endAjaxIntro() {
49
+ jQuery(".ajaxAnimation").fadeOut();
50
+ }
51
+ });
js/scripts-general.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function() {
2
+
3
+ var session_var = pirateFormsObject.errors;
4
+
5
+ if( (typeof session_var != undefined) && (session_var != '') && (typeof jQuery('#contact') != undefined) ) {
6
+
7
+ jQuery('html, body').animate({
8
+ scrollTop: jQuery('#contact').offset().top
9
+ }, 'slow');
10
+ }
11
+ });
js/scripts.js ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function() {
2
+
3
+ /* show/hide reCaptcha */
4
+
5
+ var thisOpen = false;
6
+ jQuery('.pirate_forms .form-control').each(function(){
7
+ if ( jQuery(this).val().length > 0 ){
8
+ thisOpen = true;
9
+ jQuery('.zerif-g-recaptcha').css('display','block').delay(1000).css('opacity','1');
10
+ return false;
11
+ }
12
+ });
13
+ if ( thisOpen == false && (typeof jQuery('.pirate_forms textarea').val() != 'undefined') && (jQuery('.pirate_forms textarea').val().length > 0) ) {
14
+ thisOpen = true;
15
+ jQuery('.pirate-forms-g-recaptcha').css('display','block').delay(1000).css('opacity','1');
16
+ }
17
+ jQuery('.pirate_forms input, .pirate_forms textarea').focus(function(){
18
+ if ( !jQuery('.pirate-forms-g-recaptcha').hasClass('recaptcha-display') ) {
19
+ jQuery('.pirate-forms-g-recaptcha').css('display','block').delay(1000).css('opacity','1');
20
+ }
21
+ });
22
+
23
+ });
languages/pirate-forms-de_DE.mo ADDED
Binary file
languages/pirate-forms-de_DE.po ADDED
@@ -0,0 +1,361 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Pirate Forms\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-09-18 18:41+0200\n"
6
+ "PO-Revision-Date: 2015-09-25 13:33+0200\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
+ "X-Poedit-Basepath: ../\n"
14
+ "X-Poedit-SearchPath-0: .\n"
15
+ "X-Poedit-SearchPath-1: inc\n"
16
+
17
+ #: pirate-forms.php:261
18
+ msgid "Contact Referrer"
19
+ msgstr "Kontakt Referrer"
20
+
21
+ #: pirate-forms.php:272
22
+ msgid "Referring page"
23
+ msgstr "Bezugnehmend Seite"
24
+
25
+ #: pirate-forms.php:312
26
+ msgid "Nonce failed!"
27
+ msgstr "Nonce fehlgeschlagen!"
28
+
29
+ #: pirate-forms.php:318
30
+ msgid "Form submission failed!"
31
+ msgstr "Formularübergabe fehlgeschlagen!"
32
+
33
+ #: pirate-forms.php:323
34
+ msgid "Contact form submission on"
35
+ msgstr "Kontaktformularübertragungauf"
36
+
37
+ #: pirate-forms.php:404
38
+ #: pirate-forms.php:417
39
+ msgid "Wrong reCAPTCHA"
40
+ msgstr "Falsche reCAPTCHA"
41
+
42
+ #: pirate-forms.php:448
43
+ msgid "Form submission blocked!"
44
+ msgstr "Formularübertragung blockiert!"
45
+
46
+ #: pirate-forms.php:630
47
+ msgid "Add New Contact"
48
+ msgstr "Neuen Kontakt hinzufügen"
49
+
50
+ #: pirate-forms.php:631
51
+ msgid "New Contact"
52
+ msgstr "New Kontakt"
53
+
54
+ #: pirate-forms.php:632
55
+ msgid "Edit Contact"
56
+ msgstr "Kontakt bearbeiten"
57
+
58
+ #: pirate-forms.php:633
59
+ msgid "View Contact"
60
+ msgstr "View Kontakt"
61
+
62
+ #: pirate-forms.php:634
63
+ msgid "All Contacts"
64
+ msgstr "Alle Kontakte"
65
+
66
+ #: pirate-forms.php:635
67
+ msgid "Search Contacts"
68
+ msgstr "Suche Kontakte"
69
+
70
+ #: pirate-forms.php:636
71
+ msgid "Parent Contacts:"
72
+ msgstr "Mutter Kontakte:"
73
+
74
+ #: pirate-forms.php:637
75
+ msgid "No contacts found."
76
+ msgstr "Keine Kontakte gefunden."
77
+
78
+ #: pirate-forms.php:638
79
+ msgid "No contacts found in Trash."
80
+ msgstr "Keine Kontakte gefunden im Papierkorb."
81
+
82
+ #: pirate-forms.php:642
83
+ msgid "Contacts from Pirate Forms"
84
+ msgstr "Kontakte von Pirate Forms"
85
+
86
+ #: inc/helpers.php:16
87
+ msgid "Sorry, an error occured."
88
+ msgstr "Sorry, ein Fehler aufgetreten."
89
+
90
+ #: inc/settings.php:38
91
+ #: inc/settings.php:42
92
+ msgid "Send Message"
93
+ msgstr "Nachricht senden"
94
+
95
+ #: inc/settings.php:59
96
+ msgid "Fields"
97
+ msgstr "Felder"
98
+
99
+ #: inc/settings.php:66
100
+ #: inc/settings.php:143
101
+ msgid "Name"
102
+ msgstr "Name"
103
+
104
+ #: inc/settings.php:67
105
+ msgid "Do you want the name field to be displayed?"
106
+ msgstr "Möchten Sie das Namensfeld angezeigt werden?"
107
+
108
+ #: inc/settings.php:71
109
+ #: inc/settings.php:83
110
+ #: inc/settings.php:95
111
+ #: inc/settings.php:107
112
+ msgid "None"
113
+ msgstr "Keine"
114
+
115
+ #: inc/settings.php:72
116
+ #: inc/settings.php:84
117
+ #: inc/settings.php:96
118
+ #: inc/settings.php:108
119
+ msgid "Yes but not required"
120
+ msgstr "Ja, aber nicht erforderlich"
121
+
122
+ #: inc/settings.php:73
123
+ #: inc/settings.php:85
124
+ #: inc/settings.php:97
125
+ #: inc/settings.php:109
126
+ msgid "Required"
127
+ msgstr "Erforderlich"
128
+
129
+ #: inc/settings.php:78
130
+ msgid "Email address"
131
+ msgstr "E-Mail-Addresse"
132
+
133
+ #: inc/settings.php:79
134
+ msgid "Do you want the email address field be displayed?"
135
+ msgstr "Möchten Sie die E-Mail- Adressfeld angezeigt werden?"
136
+
137
+ #: inc/settings.php:90
138
+ #: inc/settings.php:155
139
+ #: inc/settings.php:158
140
+ msgid "Subject"
141
+ msgstr "Subjekt"
142
+
143
+ #: inc/settings.php:91
144
+ msgid "Do you want the subject field be displayed?"
145
+ msgstr "Möchten Sie das Betreff-Feld angezeigt werden?"
146
+
147
+ #: inc/settings.php:102
148
+ #: inc/settings.php:161
149
+ msgid "Message"
150
+ msgstr "Meldung"
151
+
152
+ #: inc/settings.php:114
153
+ msgid "Add a reCAPTCHA"
154
+ msgstr "Fügen Sie einen reCAPTCHA"
155
+
156
+ #: inc/settings.php:121
157
+ msgid "Site key"
158
+ msgstr "Site-Schlüssel"
159
+
160
+ #: inc/settings.php:122
161
+ msgid "Create an account here "
162
+ msgstr "Erstellen Sie ein Konto hier"
163
+
164
+ #: inc/settings.php:122
165
+ msgid "to get the Site key and the Secret key for the reCaptcha."
166
+ msgstr "um die Website- Schlüssel und den geheimen Schlüssel für die reCaptcha zu bekommen."
167
+
168
+ #: inc/settings.php:128
169
+ msgid "Secret key"
170
+ msgstr "geheimen Schlüssel"
171
+
172
+ #: inc/settings.php:137
173
+ msgid "Labels"
174
+ msgstr "das Etikett"
175
+
176
+ #: inc/settings.php:146
177
+ msgid "Your Name"
178
+ msgstr "Ihr Name"
179
+
180
+ #: inc/settings.php:149
181
+ msgid "Email"
182
+ msgstr "Email"
183
+
184
+ #: inc/settings.php:152
185
+ msgid "Your Email"
186
+ msgstr "Deine E-Mail"
187
+
188
+ #: inc/settings.php:164
189
+ msgid "Your message"
190
+ msgstr "Ihre Nachricht"
191
+
192
+ #: inc/settings.php:167
193
+ msgid "Submit button"
194
+ msgstr "Submit button"
195
+
196
+ #: inc/settings.php:175
197
+ msgid "Messages"
198
+ msgstr "Nachrichten"
199
+
200
+ #: inc/settings.php:181
201
+ msgid "Name required and missing"
202
+ msgstr "Name erforderlich und fehlende"
203
+
204
+ #: inc/settings.php:184
205
+ msgid "Enter your name"
206
+ msgstr "Gib deinen Namen ein"
207
+
208
+ #: inc/settings.php:187
209
+ msgid "E-mail required and missing"
210
+ msgstr "E-mail benötigt und fehlende"
211
+
212
+ #: inc/settings.php:190
213
+ msgid "Enter a valid email"
214
+ msgstr "Geben Sie eine gültige E-Mail"
215
+
216
+ #: inc/settings.php:193
217
+ msgid "Subject required and missing"
218
+ msgstr "Angabe erforderlich und fehlende"
219
+
220
+ #: inc/settings.php:196
221
+ msgid "Please enter a subject"
222
+ msgstr "Bitte geben Sie einen Betreff"
223
+
224
+ #: inc/settings.php:199
225
+ msgid "Question/comment is missing"
226
+ msgstr "Frage / Anmerkung fehlt"
227
+
228
+ #: inc/settings.php:202
229
+ msgid "Enter your question or comment"
230
+ msgstr "Geben Sie Ihre Frage oder einen Kommentar"
231
+
232
+ #: inc/settings.php:205
233
+ msgid "Successful form submission text"
234
+ msgstr "Erfolgreiche Formularübertragung Text"
235
+
236
+ #: inc/settings.php:206
237
+ msgid "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."
238
+ msgstr "Dieser Text wird auf der Seite verwendet werden, wenn keine \"Dankeschön \" URL ist oben angegeben. Dies wird auch als der Bestätigungsmail Titel verwendet , wenn man gesetzt zu versenden ."
239
+
240
+ #: inc/settings.php:208
241
+ msgid "Thanks, your email was sent successfully!"
242
+ msgstr "Vielen Dank , Ihre E-Mail wurde erfolgreich gesendet!"
243
+
244
+ #: inc/settings.php:213
245
+ msgid "Form processing options"
246
+ msgstr "Form Verarbeitungsoptionen"
247
+
248
+ #: inc/settings.php:219
249
+ msgid "Contact notification sender email"
250
+ msgstr "Kontakt E-Mail- Benachrichtigung Absender"
251
+
252
+ #: inc/settings.php:220
253
+ msgid "Email to use for the sender of the contact form emails both to the recipients below and the contact form submitter (if this is activated below). The domain for this email address should match your site's domain."
254
+ msgstr "E-Mail an die Absender der Kontakt-Formular E-Mails sowohl auf die unten Empfänger und das Kontaktformular Einreicher ( wenn dies unten aktiviert) verwenden . Die Domain für diese E-Mail- Adresse sollte Ihre Website -Domain entsprechen."
255
+
256
+ #: inc/settings.php:226
257
+ msgid "Use the email address above as notification sender"
258
+ msgstr "Verwenden Sie die E-Mail- Adresse oben als Benachrichtigung Absender"
259
+
260
+ #: inc/settings.php:227
261
+ msgid "When this is on, the notification emails sent from your site will come from the email address above. When this is off, the emails will come from the form submitter, making it easy to reply. If you are not receiving notifications from the site, then turn this option off as your email server might be marking them as spam."
262
+ msgstr "Wenn diese aktiviert ist, wird die Benachrichtigungs-Mails von Ihrer Website geschickt aus der E-Mail- Adresse oben zu kommen. Wenn diese Option deaktiviert ist , werden die E-Mails aus dem Formular Einreicher kommen , dass es leicht zu beantworten. Wenn Sie nicht den Empfang von Benachrichtigungen von der Seite , und schalten Sie diese Option ab , wie Ihre E-Mail -Server könnte als Spam markiert sie ."
263
+
264
+ #: inc/settings.php:232
265
+ msgid "Contact submission recipients"
266
+ msgstr "Kontakt Einreichung Empfänger"
267
+
268
+ #: inc/settings.php:233
269
+ msgid "Email address(es) to receive contact submission notifications. You can separate multiple emails with a comma."
270
+ msgstr "E-Mail- Adresse (n) , um den Kontakt Einreichung Benachrichtigungen zu erhalten. Sie können mehrere E-Mails durch Komma trennen."
271
+
272
+ #: inc/settings.php:238
273
+ msgid "Store submissions in the database"
274
+ msgstr "Shop Einreichungen in der Datenbank"
275
+
276
+ #: inc/settings.php:239
277
+ msgid "Should the submissions be stored in the admin area? If chosen, contact form submissions will be saved in Contacts on the left (appears after this option is activated)."
278
+ msgstr "Sollten die Einreichungen im Admin-Bereich gespeichert werden? Wenn gewählt , werden Kontaktformular Einreichungen in den Kontakten auf der linken Seite ( wird angezeigt, nachdem diese Option aktiviert ) gespeichert werden."
279
+
280
+ #: inc/settings.php:244
281
+ msgid "Use the comments blacklist to restrict submissions"
282
+ msgstr "Verwenden Sie die Kommentare Blacklist , um Einsendungen zu beschränken"
283
+
284
+ #: inc/settings.php:245
285
+ msgid "Should form submission IP and email addresses be compared against the Comment Blacklist, found in"
286
+ msgstr "Sollte die Einreichung IP bilden und Email-Adressen gegen den Kommentar Blacklist verglichen werden , in gefunden"
287
+
288
+ #: inc/settings.php:245
289
+ msgid "wp-admin > Settings > Discussion > Comment Blacklist?"
290
+ msgstr "wp-admin > Einstellungen> Diskussion > Hats Blacklist ?"
291
+
292
+ #: inc/settings.php:250
293
+ msgid "Send email confirmation to form submitter"
294
+ msgstr "Senden Sie E-Mail- Bestätigung an Einreicher bilden"
295
+
296
+ #: inc/settings.php:251
297
+ msgid "Adding text here will send an email to the form submitter. The email uses the \"Text to show when form is submitted...\" field below as the subject line. Plain text only here, no HTML."
298
+ msgstr "Hinzufügen von Text hier eine E-Mail in das Formular Einreicher zu senden. Die E-Mail verwendet die \"Text , um zu zeigen , wenn das Formular ... vorgelegt \" Feld unterhalb dem Betreff . Klartext nur hier , kein HTML ."
299
+
300
+ #: inc/settings.php:258
301
+ msgid "Use SMTP to send emails?"
302
+ msgstr "Verwenden Sie SMTP- E-Mails schicken?"
303
+
304
+ #: inc/settings.php:259
305
+ msgid "Instead of PHP mail function"
306
+ msgstr "Anstelle von PHP Mail-Funktion"
307
+
308
+ #: inc/settings.php:264
309
+ msgid "SMTP Host"
310
+ msgstr "SMTP Host"
311
+
312
+ #: inc/settings.php:270
313
+ msgid "SMTP Port"
314
+ msgstr "SMTP Port"
315
+
316
+ #: inc/settings.php:276
317
+ msgid "Use SMTP Authentication?"
318
+ msgstr "Verwenden Sie SMTP-Authentifizierung ?"
319
+
320
+ #: inc/settings.php:277
321
+ msgid "If you check this box, make sure the SMTP Username and SMTP Password are completed."
322
+ msgstr "Wenn Sie dieses Kontrollkästchen aktivieren , stellen Sie sicher, dass der SMTP- Benutzernamen und das SMTP-Kennwort abgeschlossen sind."
323
+
324
+ #: inc/settings.php:282
325
+ msgid "SMTP Username"
326
+ msgstr "SMTP Benutzername"
327
+
328
+ #: inc/settings.php:288
329
+ msgid "SMTP Password"
330
+ msgstr "SMTP Passwort"
331
+
332
+ #: inc/settings.php:306
333
+ msgid "Pirate Forms settings"
334
+ msgstr "Piraten Forms Einstellungen"
335
+
336
+ #: inc/settings.php:307
337
+ #: inc/widget.php:15
338
+ #: inc/widget.php:16
339
+ msgid "Pirate Forms"
340
+ msgstr "Piraten Forms"
341
+
342
+ #: inc/settings.php:503
343
+ msgid "Save changes"
344
+ msgstr "Änderungen speichern"
345
+
346
+ #: inc/widget.php:75
347
+ msgid "Title"
348
+ msgstr "Titel"
349
+
350
+ #: inc/widget.php:76
351
+ msgid "Text above form"
352
+ msgstr "Text oben Form"
353
+
354
+ #: inc/widget.php:79
355
+ msgid "Title:"
356
+ msgstr "Titel:"
357
+
358
+ #: inc/widget.php:83
359
+ msgid "Subtext:"
360
+ msgstr "Subtext:"
361
+
languages/pirate-forms-es_ES.mo ADDED
Binary file
languages/pirate-forms-es_ES.po ADDED
@@ -0,0 +1,406 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Pirate Forms\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-10-15 12:30-0300\n"
6
+ "PO-Revision-Date: 2015-10-15 12:30-0300\n"
7
+ "Last-Translator: Caribdis Web Design <caribdisweb@gmail.com>\n"
8
+ "Language-Team: \n"
9
+ "Language: es_ES\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
14
+ "X-Poedit-Basepath: ..\n"
15
+ "X-Generator: Poedit 1.8.5\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+ "X-Poedit-SearchPath-1: inc\n"
18
+
19
+ #: inc/helpers.php:16
20
+ msgid "Sorry, an error occured."
21
+ msgstr "Disculpe, ha ocurrido un error."
22
+
23
+ #: inc/settings.php:38 inc/settings.php:42
24
+ msgid "Send Message"
25
+ msgstr "Enviar mensaje"
26
+
27
+ #: inc/settings.php:58
28
+ msgid "Fields"
29
+ msgstr "Campos"
30
+
31
+ #: inc/settings.php:65 inc/settings.php:142
32
+ msgid "Name"
33
+ msgstr "Nombre"
34
+
35
+ #: inc/settings.php:66
36
+ msgid "Do you want the name field to be displayed?"
37
+ msgstr "¿Desea mostrar el campo \"Nombre\"?"
38
+
39
+ #: inc/settings.php:70 inc/settings.php:82 inc/settings.php:94
40
+ #: inc/settings.php:106
41
+ msgid "None"
42
+ msgstr "No"
43
+
44
+ #: inc/settings.php:71 inc/settings.php:83 inc/settings.php:95
45
+ #: inc/settings.php:107
46
+ msgid "Yes but not required"
47
+ msgstr "Sí, pero no obligatorio"
48
+
49
+ #: inc/settings.php:72 inc/settings.php:84 inc/settings.php:96
50
+ #: inc/settings.php:108
51
+ msgid "Required"
52
+ msgstr "Obligatorio"
53
+
54
+ #: inc/settings.php:77
55
+ msgid "Email address"
56
+ msgstr "Dirección de correo electrónico"
57
+
58
+ #: inc/settings.php:78
59
+ msgid "Do you want the email address field be displayed?"
60
+ msgstr "¿Desea mostrar el campo \"Dirección de correo electrónico\"?"
61
+
62
+ #: inc/settings.php:89 inc/settings.php:154 inc/settings.php:157
63
+ msgid "Subject"
64
+ msgstr "Asunto"
65
+
66
+ #: inc/settings.php:90
67
+ msgid "Do you want the subject field be displayed?"
68
+ msgstr "¿Desea mostrar el campo \"Asunto\"?"
69
+
70
+ #: inc/settings.php:101 inc/settings.php:160
71
+ msgid "Message"
72
+ msgstr "Mensaje"
73
+
74
+ #: inc/settings.php:113
75
+ msgid "Add a reCAPTCHA"
76
+ msgstr "Añadir un reCAPTCHA"
77
+
78
+ #: inc/settings.php:120
79
+ msgid "Site key"
80
+ msgstr "Clave del sitio"
81
+
82
+ #: inc/settings.php:121
83
+ msgid "Create an account here "
84
+ msgstr "Crear una cuenta aquí "
85
+
86
+ #: inc/settings.php:121
87
+ msgid "to get the Site key and the Secret key for the reCaptcha."
88
+ msgstr "para obtener la clave del sitio y la clave secreta para el reCaptcha."
89
+
90
+ #: inc/settings.php:127
91
+ msgid "Secret key"
92
+ msgstr "Clave secreta"
93
+
94
+ #: inc/settings.php:136
95
+ msgid "Labels"
96
+ msgstr "Etiquetas"
97
+
98
+ #: inc/settings.php:145
99
+ msgid "Your Name"
100
+ msgstr "Nombre"
101
+
102
+ #: inc/settings.php:148
103
+ msgid "Email"
104
+ msgstr "Correo electrónico"
105
+
106
+ #: inc/settings.php:151
107
+ msgid "Your Email"
108
+ msgstr "Correo electrónico"
109
+
110
+ #: inc/settings.php:163
111
+ msgid "Your message"
112
+ msgstr "Mensaje"
113
+
114
+ #: inc/settings.php:166
115
+ msgid "Submit button"
116
+ msgstr "Botón \"Enviar\""
117
+
118
+ #: inc/settings.php:174
119
+ msgid "Messages"
120
+ msgstr "Mensajes"
121
+
122
+ #: inc/settings.php:180
123
+ msgid "Name required and missing"
124
+ msgstr "Falta el nombre y es obligatorio"
125
+
126
+ #: inc/settings.php:183
127
+ msgid "Enter your name"
128
+ msgstr "Escriba su nombre"
129
+
130
+ #: inc/settings.php:186
131
+ msgid "E-mail required and missing"
132
+ msgstr "Falta el correo electrónico y es obligatorio"
133
+
134
+ #: inc/settings.php:189
135
+ msgid "Enter a valid email"
136
+ msgstr "Escriba un correo electrónico válido"
137
+
138
+ #: inc/settings.php:192
139
+ msgid "Subject required and missing"
140
+ msgstr "Falta el asunto y es obligatorio"
141
+
142
+ #: inc/settings.php:195
143
+ msgid "Please enter a subject"
144
+ msgstr "Por favor, escriba un asunto"
145
+
146
+ #: inc/settings.php:198
147
+ msgid "Question/comment is missing"
148
+ msgstr "Falta la pregunta/comentario"
149
+
150
+ #: inc/settings.php:201
151
+ msgid "Enter your question or comment"
152
+ msgstr "Escriba su pregunta o comentario"
153
+
154
+ #: inc/settings.php:204
155
+ msgid "Successful form submission text"
156
+ msgstr "Envío del formulario con éxito"
157
+
158
+ #: inc/settings.php:205
159
+ msgid ""
160
+ "This text is used on the page if no \"Thank You\" URL is set above. This is "
161
+ "also used as the confirmation email title, if one is set to send out."
162
+ msgstr ""
163
+ "Este texto se usa en la página cuando no se asigna una URL distinta para el "
164
+ "mensaje de agradecimiento. También se utiliza como título del mensaje de "
165
+ "confirmación, si ha establecido que se envíe."
166
+
167
+ #: inc/settings.php:207
168
+ msgid "Thanks, your email was sent successfully!"
169
+ msgstr "¡Gracias, su mensaje fue enviado con éxito!"
170
+
171
+ #: inc/settings.php:212
172
+ msgid "Form processing options"
173
+ msgstr "Opciones de procesamiento del formulario"
174
+
175
+ #: inc/settings.php:218
176
+ msgid "Contact notification sender email"
177
+ msgstr "Correo electrónico del remitente para notificaciones"
178
+
179
+ #: inc/settings.php:219
180
+ msgid ""
181
+ "Email to use for the sender of the contact form emails both to the "
182
+ "recipients below and the contact form submitter (if this is activated "
183
+ "below). The domain for this email address should match your site's domain."
184
+ msgstr ""
185
+ "El correo electrónico para usar como remitente de los mensajes, tanto para "
186
+ "los siguientes destinatarios como para quien envía el mensaje desde el "
187
+ "formulario (si se activa a continuación). El dominio de esta dirección de "
188
+ "correo electrónico debe coincidir con el dominio de su sitio."
189
+
190
+ #: inc/settings.php:225
191
+ msgid "Use the email address above as notification sender"
192
+ msgstr ""
193
+ "Usar la dirección de correo electrónico anterior como remitente de la "
194
+ "notificación"
195
+
196
+ #: inc/settings.php:226
197
+ msgid ""
198
+ "When this is on, the notification emails sent from your site will come from "
199
+ "the email address above. When this is off, the emails will come from the "
200
+ "form submitter, making it easy to reply. If you are not receiving "
201
+ "notifications from the site, then turn this option off as your email server "
202
+ "might be marking them as spam."
203
+ msgstr ""
204
+ "Cuando esto está activado, los mensajes de notificación enviados desde su "
205
+ "sitio provendrán de la dirección de correo electrónico anterior. Cuando esto "
206
+ "está desactivado, los mensajes provendrán del remitente del formulario, para "
207
+ "que sea más fácil responderlos. Si no está recibiendo notificaciones desde "
208
+ "el sitio, desactive esta opción, ya que su servidor de correo puede estar "
209
+ "marcándolos como spam."
210
+
211
+ #: inc/settings.php:231
212
+ msgid "Contact submission recipients"
213
+ msgstr "Destinatarios del envío"
214
+
215
+ #: inc/settings.php:232
216
+ msgid ""
217
+ "Email address(es) to receive contact submission notifications. You can "
218
+ "separate multiple emails with a comma."
219
+ msgstr ""
220
+ "La o las direcciones de correo electrónico para recibir notificaciones de "
221
+ "envío. Puede separar múltiples direcciones con una coma."
222
+
223
+ #: inc/settings.php:237
224
+ msgid "Store submissions in the database"
225
+ msgstr "Guardar los envíos en la base de datos"
226
+
227
+ #: inc/settings.php:238
228
+ msgid ""
229
+ "Should the submissions be stored in the admin area? If chosen, contact form "
230
+ "submissions will be saved in Contacts on the left (appears after this option "
231
+ "is activated)."
232
+ msgstr ""
233
+ "¿Los envíos deben guardarse en el área de administración? Si se selecciona, "
234
+ "los envíos desde el formulario de contacto serán guardados en \"Contactos\", "
235
+ "en la parte la izquierda (aparecerá una vez activada esta opción)."
236
+
237
+ #: inc/settings.php:243
238
+ msgid "Use the comments blacklist to restrict submissions"
239
+ msgstr "Usar lista negra de comentarios para restringir envíos"
240
+
241
+ #: inc/settings.php:244
242
+ msgid ""
243
+ "Should form submission IP and email addresses be compared against the "
244
+ "Comment Blacklist, found in"
245
+ msgstr ""
246
+ "¿Las IP y direcciones de los envíos desde el formulario deben compararse con "
247
+ "la lista negra de comentarios que se encuentra en"
248
+
249
+ #: inc/settings.php:244
250
+ msgid "wp-admin > Settings > Discussion > Comment Blacklist?"
251
+ msgstr "WordPress > Ajustes > Comentarios > Lista negra de comentarios?"
252
+
253
+ #: inc/settings.php:249
254
+ msgid "Send email confirmation to form submitter"
255
+ msgstr "Enviar un mensaje de confirmación al remitente del formulario"
256
+
257
+ #: inc/settings.php:250
258
+ msgid ""
259
+ "Adding text here will send an email to the form submitter. The email uses "
260
+ "the \"Text to show when form is submitted...\" field below as the subject "
261
+ "line. Plain text only here, no HTML."
262
+ msgstr ""
263
+ "Si añade un texto aquí se le enviará un mensaje al remitente del formulario. "
264
+ "Este mensaje usa el siguiente campo \"Texto para mostrar cuando se envía el "
265
+ "formulario...\" como línea del asunto. Solo se admite texto sin formato, no "
266
+ "HTML."
267
+
268
+ #: inc/settings.php:257
269
+ msgid "Use SMTP to send emails?"
270
+ msgstr "¿Usar SMTP para enviar los mensajes?"
271
+
272
+ #: inc/settings.php:258
273
+ msgid "Instead of PHP mail function"
274
+ msgstr "En lugar de la función PHP mail"
275
+
276
+ #: inc/settings.php:263
277
+ msgid "SMTP Host"
278
+ msgstr "Servidor de SMTP"
279
+
280
+ #: inc/settings.php:269
281
+ msgid "SMTP Port"
282
+ msgstr "Puerto SMTP"
283
+
284
+ #: inc/settings.php:275
285
+ msgid "Use SMTP Authentication?"
286
+ msgstr "¿Usar autenticación SMTP?"
287
+
288
+ #: inc/settings.php:276
289
+ msgid ""
290
+ "If you check this box, make sure the SMTP Username and SMTP Password are "
291
+ "completed."
292
+ msgstr ""
293
+ "Si selecciona esta casilla, asegúrese de completar el nombre de usuario SMTP "
294
+ "y la contraseña SMTP."
295
+
296
+ #: inc/settings.php:281
297
+ msgid "SMTP Username"
298
+ msgstr "Nombre de usuario SMTP"
299
+
300
+ #: inc/settings.php:287
301
+ msgid "SMTP Password"
302
+ msgstr "Contraseña SMTP"
303
+
304
+ #: inc/settings.php:305
305
+ msgid "Pirate Forms settings"
306
+ msgstr "Ajustes de Pirate Forms"
307
+
308
+ #: inc/settings.php:306 inc/widget.php:15 inc/widget.php:16
309
+ msgid "Pirate Forms"
310
+ msgstr "Pirate Forms"
311
+
312
+ #: inc/settings.php:542
313
+ msgid "Save changes"
314
+ msgstr "Guardar cambios"
315
+
316
+ #: inc/widget.php:75
317
+ msgid "Title"
318
+ msgstr "Título"
319
+
320
+ #: inc/widget.php:76
321
+ msgid "Text above form"
322
+ msgstr "Texto arriba del formulario"
323
+
324
+ #: inc/widget.php:79
325
+ msgid "Title:"
326
+ msgstr "Título:"
327
+
328
+ #: inc/widget.php:83
329
+ msgid "Subtext:"
330
+ msgstr "Subtítulo:"
331
+
332
+ #: pirate-forms.php:294
333
+ msgid "Contact Referrer"
334
+ msgstr "Contacto referente"
335
+
336
+ #: pirate-forms.php:305
337
+ msgid "Referring page"
338
+ msgstr "Página de referencia"
339
+
340
+ #: pirate-forms.php:345
341
+ msgid "Nonce failed!"
342
+ msgstr "¡Falló nonce!"
343
+
344
+ #: pirate-forms.php:351
345
+ msgid "Form submission failed!"
346
+ msgstr "¡Falló el envío del formulario!"
347
+
348
+ #: pirate-forms.php:356
349
+ msgid "Contact form submission on"
350
+ msgstr "Envío del formulario de contacto en"
351
+
352
+ #: pirate-forms.php:437 pirate-forms.php:450
353
+ msgid "Wrong reCAPTCHA"
354
+ msgstr "reCAPTCHA incorrecto"
355
+
356
+ #: pirate-forms.php:461
357
+ msgid "Please enter one or more Contact submission recipients"
358
+ msgstr "Por favor, introduzca uno o más destinatarios del envío"
359
+
360
+ #: pirate-forms.php:490
361
+ msgid "Form submission blocked!"
362
+ msgstr "¡Envío de formulario bloqueado!"
363
+
364
+ #: pirate-forms.php:683
365
+ msgid "Add New Contact"
366
+ msgstr "Añadir nuevo contacto"
367
+
368
+ #: pirate-forms.php:684
369
+ msgid "New Contact"
370
+ msgstr "Nuevo contacto"
371
+
372
+ #: pirate-forms.php:685
373
+ msgid "Edit Contact"
374
+ msgstr "Editar contacto"
375
+
376
+ #: pirate-forms.php:686
377
+ msgid "View Contact"
378
+ msgstr "Ver contacto"
379
+
380
+ #: pirate-forms.php:687
381
+ msgid "All Contacts"
382
+ msgstr "Todos los contactos"
383
+
384
+ #: pirate-forms.php:688
385
+ msgid "Search Contacts"
386
+ msgstr "Buscar contactos"
387
+
388
+ #: pirate-forms.php:689
389
+ msgid "Parent Contacts:"
390
+ msgstr "Contactos superiores:"
391
+
392
+ #: pirate-forms.php:690
393
+ msgid "No contacts found."
394
+ msgstr "No se han encontrado contactos."
395
+
396
+ #: pirate-forms.php:691
397
+ msgid "No contacts found in Trash."
398
+ msgstr "No se han encontrado contactos en la papelera."
399
+
400
+ #: pirate-forms.php:695
401
+ msgid "Contacts from Pirate Forms"
402
+ msgstr "Contactos de Pirate Forms"
403
+
404
+ #: pirate-forms.php:717
405
+ msgid "Settings"
406
+ msgstr "Ajustes"
languages/pirate-forms-ro_RO.mo ADDED
Binary file
languages/pirate-forms-ro_RO.po ADDED
@@ -0,0 +1,361 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Pirate Forms\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-09-18 18:41+0200\n"
6
+ "PO-Revision-Date: 2015-09-25 15:53+0200\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
+ "X-Poedit-Basepath: ../\n"
14
+ "X-Poedit-SearchPath-0: .\n"
15
+ "X-Poedit-SearchPath-1: inc\n"
16
+
17
+ #: pirate-forms.php:261
18
+ msgid "Contact Referrer"
19
+ msgstr "Contact Referrer"
20
+
21
+ #: pirate-forms.php:272
22
+ msgid "Referring page"
23
+ msgstr "Pagina de referință"
24
+
25
+ #: pirate-forms.php:312
26
+ msgid "Nonce failed!"
27
+ msgstr "Eroare la nounce!"
28
+
29
+ #: pirate-forms.php:318
30
+ msgid "Form submission failed!"
31
+ msgstr "Trimiterea formularului nu a reușit !"
32
+
33
+ #: pirate-forms.php:323
34
+ msgid "Contact form submission on"
35
+ msgstr "Trimiterea formularului de contact pe"
36
+
37
+ #: pirate-forms.php:404
38
+ #: pirate-forms.php:417
39
+ msgid "Wrong reCAPTCHA"
40
+ msgstr "reCAPTCHA greșită"
41
+
42
+ #: pirate-forms.php:448
43
+ msgid "Form submission blocked!"
44
+ msgstr "Trimiterea formularului a fost blocată!"
45
+
46
+ #: pirate-forms.php:630
47
+ msgid "Add New Contact"
48
+ msgstr "Adauga contact nou"
49
+
50
+ #: pirate-forms.php:631
51
+ msgid "New Contact"
52
+ msgstr "Contact nou"
53
+
54
+ #: pirate-forms.php:632
55
+ msgid "Edit Contact"
56
+ msgstr "Editeaza contact"
57
+
58
+ #: pirate-forms.php:633
59
+ msgid "View Contact"
60
+ msgstr "Vezi Contact"
61
+
62
+ #: pirate-forms.php:634
63
+ msgid "All Contacts"
64
+ msgstr "Toate Contactele"
65
+
66
+ #: pirate-forms.php:635
67
+ msgid "Search Contacts"
68
+ msgstr "Caută contacte"
69
+
70
+ #: pirate-forms.php:636
71
+ msgid "Parent Contacts:"
72
+ msgstr "Părinte Contacte:"
73
+
74
+ #: pirate-forms.php:637
75
+ msgid "No contacts found."
76
+ msgstr "Nu au fost găsite contacte"
77
+
78
+ #: pirate-forms.php:638
79
+ msgid "No contacts found in Trash."
80
+ msgstr " Nu au fost găsite contacte în coșul de gunoi"
81
+
82
+ #: pirate-forms.php:642
83
+ msgid "Contacts from Pirate Forms"
84
+ msgstr "Contacte din Formularul Pirate"
85
+
86
+ #: inc/helpers.php:16
87
+ msgid "Sorry, an error occured."
88
+ msgstr "Ne pare rău, a apărut o eroare."
89
+
90
+ #: inc/settings.php:38
91
+ #: inc/settings.php:42
92
+ msgid "Send Message"
93
+ msgstr "Trimite mesajul"
94
+
95
+ #: inc/settings.php:59
96
+ msgid "Fields"
97
+ msgstr "Câmpuri"
98
+
99
+ #: inc/settings.php:66
100
+ #: inc/settings.php:143
101
+ msgid "Name"
102
+ msgstr "Nume"
103
+
104
+ #: inc/settings.php:67
105
+ msgid "Do you want the name field to be displayed?"
106
+ msgstr "Vrei să fie afișat câmpul nume?"
107
+
108
+ #: inc/settings.php:71
109
+ #: inc/settings.php:83
110
+ #: inc/settings.php:95
111
+ #: inc/settings.php:107
112
+ msgid "None"
113
+ msgstr "Nu"
114
+
115
+ #: inc/settings.php:72
116
+ #: inc/settings.php:84
117
+ #: inc/settings.php:96
118
+ #: inc/settings.php:108
119
+ msgid "Yes but not required"
120
+ msgstr "Da, dar nu obligatoriu"
121
+
122
+ #: inc/settings.php:73
123
+ #: inc/settings.php:85
124
+ #: inc/settings.php:97
125
+ #: inc/settings.php:109
126
+ msgid "Required"
127
+ msgstr "Obligatoriu"
128
+
129
+ #: inc/settings.php:78
130
+ msgid "Email address"
131
+ msgstr "Adresă de email"
132
+
133
+ #: inc/settings.php:79
134
+ msgid "Do you want the email address field be displayed?"
135
+ msgstr "Vreți sa fie afișat câmpul adresa de email?"
136
+
137
+ #: inc/settings.php:90
138
+ #: inc/settings.php:155
139
+ #: inc/settings.php:158
140
+ msgid "Subject"
141
+ msgstr "Subiect"
142
+
143
+ #: inc/settings.php:91
144
+ msgid "Do you want the subject field be displayed?"
145
+ msgstr "Vrei să fie afișat câmpul subiect?"
146
+
147
+ #: inc/settings.php:102
148
+ #: inc/settings.php:161
149
+ msgid "Message"
150
+ msgstr "Mesaj"
151
+
152
+ #: inc/settings.php:114
153
+ msgid "Add a reCAPTCHA"
154
+ msgstr "Adaugă reCAPTCHA"
155
+
156
+ #: inc/settings.php:121
157
+ msgid "Site key"
158
+ msgstr "Cheia site-ului"
159
+
160
+ #: inc/settings.php:122
161
+ msgid "Create an account here "
162
+ msgstr "Creează-ți un cont aici"
163
+
164
+ #: inc/settings.php:122
165
+ msgid "to get the Site key and the Secret key for the reCaptcha."
166
+ msgstr "pentru a obține cheia site-ului și cheia secretă pentru reCAPTCHA."
167
+
168
+ #: inc/settings.php:128
169
+ msgid "Secret key"
170
+ msgstr "Cheia secretă"
171
+
172
+ #: inc/settings.php:137
173
+ msgid "Labels"
174
+ msgstr "Etichete"
175
+
176
+ #: inc/settings.php:146
177
+ msgid "Your Name"
178
+ msgstr "Numele tău"
179
+
180
+ #: inc/settings.php:149
181
+ msgid "Email"
182
+ msgstr "Email"
183
+
184
+ #: inc/settings.php:152
185
+ msgid "Your Email"
186
+ msgstr "Emailul tău"
187
+
188
+ #: inc/settings.php:164
189
+ msgid "Your message"
190
+ msgstr "Mesajul tău"
191
+
192
+ #: inc/settings.php:167
193
+ msgid "Submit button"
194
+ msgstr "Buton de trimis formularul"
195
+
196
+ #: inc/settings.php:175
197
+ msgid "Messages"
198
+ msgstr "Mesaje"
199
+
200
+ #: inc/settings.php:181
201
+ msgid "Name required and missing"
202
+ msgstr "Numele este necesar și lipsește"
203
+
204
+ #: inc/settings.php:184
205
+ msgid "Enter your name"
206
+ msgstr "Introdu numele tău"
207
+
208
+ #: inc/settings.php:187
209
+ msgid "E-mail required and missing"
210
+ msgstr "Adresa de e-mail este necesară și lipsește"
211
+
212
+ #: inc/settings.php:190
213
+ msgid "Enter a valid email"
214
+ msgstr "Introduceți o adresă de e-mail validă"
215
+
216
+ #: inc/settings.php:193
217
+ msgid "Subject required and missing"
218
+ msgstr "Subiectul este necesar și lipseşte"
219
+
220
+ #: inc/settings.php:196
221
+ msgid "Please enter a subject"
222
+ msgstr "Vă rugăm să introduceți un subiect"
223
+
224
+ #: inc/settings.php:199
225
+ msgid "Question/comment is missing"
226
+ msgstr "Intrebarea / comentariul lipsește"
227
+
228
+ #: inc/settings.php:202
229
+ msgid "Enter your question or comment"
230
+ msgstr "Introduceți întrebarea dvs. sau comentariul"
231
+
232
+ #: inc/settings.php:205
233
+ msgid "Successful form submission text"
234
+ msgstr "Mesajul de succes pentru formular"
235
+
236
+ #: inc/settings.php:206
237
+ msgid "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."
238
+ msgstr "Acest text este folosit în pagină dacă nu este setat mai sus \" Thank You \" URL. Acest text este, de asemenea, utilizat ca titlul email-ului de confirmare, în cazul în care unul este setat."
239
+
240
+ #: inc/settings.php:208
241
+ msgid "Thanks, your email was sent successfully!"
242
+ msgstr "Mulțumim , e-mailul a fost trimis cu succes !"
243
+
244
+ #: inc/settings.php:213
245
+ msgid "Form processing options"
246
+ msgstr "Opțiuni de procesare a formularului"
247
+
248
+ #: inc/settings.php:219
249
+ msgid "Contact notification sender email"
250
+ msgstr "Email-ul expeditorului pentru notificari"
251
+
252
+ #: inc/settings.php:220
253
+ msgid "Email to use for the sender of the contact form emails both to the recipients below and the contact form submitter (if this is activated below). The domain for this email address should match your site's domain."
254
+ msgstr "E-mail utilizat pentru expeditorul e-mailurilor, atât la destinatarii de mai jos și cel care a trimis formularul de contact ( dacă acest lucru este activat de mai jos ) . Domeniul pentru această adresă de e-mail ar trebui să corespundă domeniului site-ului."
255
+
256
+ #: inc/settings.php:226
257
+ msgid "Use the email address above as notification sender"
258
+ msgstr "Utilizați adresa de email de mai sus ca expeditorul notificarilor"
259
+
260
+ #: inc/settings.php:227
261
+ msgid "When this is on, the notification emails sent from your site will come from the email address above. When this is off, the emails will come from the form submitter, making it easy to reply. If you are not receiving notifications from the site, then turn this option off as your email server might be marking them as spam."
262
+ msgstr "Când acestă căsuță este selectată, e-mailurile de notificare trimise de site-ul dvs. vor veni de la adresa de email de mai sus . Atunci când acestă căsuță nu este selectată , e-mailurile vor veni de la autorul formularului, făcând ușoară modalitatea de a răspunde. Dacă nu primiți notificări de pe site-ul dvs., dezactivați această opțiune deoarece server-ul dvs. de e-mail le-ar putea marca ca spam."
263
+
264
+ #: inc/settings.php:232
265
+ msgid "Contact submission recipients"
266
+ msgstr "Destinatarii formularelor de contact"
267
+
268
+ #: inc/settings.php:233
269
+ msgid "Email address(es) to receive contact submission notifications. You can separate multiple emails with a comma."
270
+ msgstr "Adresa/e de email, la care se primesc notificări. Puteți separa mai multe e-mailuri cu virgulă."
271
+
272
+ #: inc/settings.php:238
273
+ msgid "Store submissions in the database"
274
+ msgstr "Doriți să salvați email-urile în baza de date"
275
+
276
+ #: inc/settings.php:239
277
+ msgid "Should the submissions be stored in the admin area? If chosen, contact form submissions will be saved in Contacts on the left (appears after this option is activated)."
278
+ msgstr "Doriți ca observațiile să fie stocate în zona de admin? Dacă da , email-urile vor fi salvate în Contacte în meniul din stanga ( apare după ce această opțiune este activată)."
279
+
280
+ #: inc/settings.php:244
281
+ msgid "Use the comments blacklist to restrict submissions"
282
+ msgstr "Utilizați lista neagră a comentariilor pentru a restricționa email-urile"
283
+
284
+ #: inc/settings.php:245
285
+ msgid "Should form submission IP and email addresses be compared against the Comment Blacklist, found in"
286
+ msgstr "Ar trebui ca IP-ul și adresa de email să fie comparate cu lista neagră, găsită în"
287
+
288
+ #: inc/settings.php:245
289
+ msgid "wp-admin > Settings > Discussion > Comment Blacklist?"
290
+ msgstr "wp-admin > Settings > Discutii > Lista neagra?"
291
+
292
+ #: inc/settings.php:250
293
+ msgid "Send email confirmation to form submitter"
294
+ msgstr "Trimite confirmare prin e-mail celui care a emis formularul"
295
+
296
+ #: inc/settings.php:251
297
+ msgid "Adding text here will send an email to the form submitter. The email uses the \"Text to show when form is submitted...\" field below as the subject line. Plain text only here, no HTML."
298
+ msgstr "Adăugarea de text aici va trimite un e-mail la emitentul formularului. E-mail utilizează \" Text afisat atunci când formularul este trimis ... \" câmpul de mai jos ca linia de subiect. Doar text simplu aici, nu HTML."
299
+
300
+ #: inc/settings.php:258
301
+ msgid "Use SMTP to send emails?"
302
+ msgstr "Doriți să utilizați SMTP pentru a trimite emailuri?"
303
+
304
+ #: inc/settings.php:259
305
+ msgid "Instead of PHP mail function"
306
+ msgstr "în loc de funcția PHP mail"
307
+
308
+ #: inc/settings.php:264
309
+ msgid "SMTP Host"
310
+ msgstr "Gazda SMTP"
311
+
312
+ #: inc/settings.php:270
313
+ msgid "SMTP Port"
314
+ msgstr "Portul SMTP"
315
+
316
+ #: inc/settings.php:276
317
+ msgid "Use SMTP Authentication?"
318
+ msgstr "Doriți autentificarea SMTP?"
319
+
320
+ #: inc/settings.php:277
321
+ msgid "If you check this box, make sure the SMTP Username and SMTP Password are completed."
322
+ msgstr "După selectarea acestei căsuțe, te rugăm să completezi utilizatorul SMTP și parola SMTP. "
323
+
324
+ #: inc/settings.php:282
325
+ msgid "SMTP Username"
326
+ msgstr "Utilizator SMTP"
327
+
328
+ #: inc/settings.php:288
329
+ msgid "SMTP Password"
330
+ msgstr "Parola SMTP"
331
+
332
+ #: inc/settings.php:306
333
+ msgid "Pirate Forms settings"
334
+ msgstr "Formularul Piraților - setări"
335
+
336
+ #: inc/settings.php:307
337
+ #: inc/widget.php:15
338
+ #: inc/widget.php:16
339
+ msgid "Pirate Forms"
340
+ msgstr "Formularul Piraților"
341
+
342
+ #: inc/settings.php:503
343
+ msgid "Save changes"
344
+ msgstr "Salvează"
345
+
346
+ #: inc/widget.php:75
347
+ msgid "Title"
348
+ msgstr "Titlu"
349
+
350
+ #: inc/widget.php:76
351
+ msgid "Text above form"
352
+ msgstr "Text deasupra formularului:"
353
+
354
+ #: inc/widget.php:79
355
+ msgid "Title:"
356
+ msgstr "Titlu:"
357
+
358
+ #: inc/widget.php:83
359
+ msgid "Subtext:"
360
+ msgstr "Subtext:"
361
+
languages/pirate-forms.pot ADDED
@@ -0,0 +1,361 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Pirate Forms\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2015-09-18 18:41+0200\n"
6
+ "PO-Revision-Date: 2015-09-18 18:41+0200\n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: themeisle <friends@themeisle.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
+ "X-Poedit-Basepath: ../\n"
14
+ "X-Poedit-SearchPath-0: .\n"
15
+ "X-Poedit-SearchPath-1: inc\n"
16
+
17
+ #: pirate-forms.php:261
18
+ msgid "Contact Referrer"
19
+ msgstr ""
20
+
21
+ #: pirate-forms.php:272
22
+ msgid "Referring page"
23
+ msgstr ""
24
+
25
+ #: pirate-forms.php:312
26
+ msgid "Nonce failed!"
27
+ msgstr ""
28
+
29
+ #: pirate-forms.php:318
30
+ msgid "Form submission failed!"
31
+ msgstr ""
32
+
33
+ #: pirate-forms.php:323
34
+ msgid "Contact form submission on"
35
+ msgstr ""
36
+
37
+ #: pirate-forms.php:404
38
+ #: pirate-forms.php:417
39
+ msgid "Wrong reCAPTCHA"
40
+ msgstr ""
41
+
42
+ #: pirate-forms.php:448
43
+ msgid "Form submission blocked!"
44
+ msgstr ""
45
+
46
+ #: pirate-forms.php:630
47
+ msgid "Add New Contact"
48
+ msgstr ""
49
+
50
+ #: pirate-forms.php:631
51
+ msgid "New Contact"
52
+ msgstr ""
53
+
54
+ #: pirate-forms.php:632
55
+ msgid "Edit Contact"
56
+ msgstr ""
57
+
58
+ #: pirate-forms.php:633
59
+ msgid "View Contact"
60
+ msgstr ""
61
+
62
+ #: pirate-forms.php:634
63
+ msgid "All Contacts"
64
+ msgstr ""
65
+
66
+ #: pirate-forms.php:635
67
+ msgid "Search Contacts"
68
+ msgstr ""
69
+
70
+ #: pirate-forms.php:636
71
+ msgid "Parent Contacts:"
72
+ msgstr ""
73
+
74
+ #: pirate-forms.php:637
75
+ msgid "No contacts found."
76
+ msgstr ""
77
+
78
+ #: pirate-forms.php:638
79
+ msgid "No contacts found in Trash."
80
+ msgstr ""
81
+
82
+ #: pirate-forms.php:642
83
+ msgid "Contacts from Pirate Forms"
84
+ msgstr ""
85
+
86
+ #: inc/helpers.php:16
87
+ msgid "Sorry, an error occured."
88
+ msgstr ""
89
+
90
+ #: inc/settings.php:38
91
+ #: inc/settings.php:42
92
+ msgid "Send Message"
93
+ msgstr ""
94
+
95
+ #: inc/settings.php:59
96
+ msgid "Fields"
97
+ msgstr ""
98
+
99
+ #: inc/settings.php:66
100
+ #: inc/settings.php:143
101
+ msgid "Name"
102
+ msgstr ""
103
+
104
+ #: inc/settings.php:67
105
+ msgid "Do you want the name field to be displayed?"
106
+ msgstr ""
107
+
108
+ #: inc/settings.php:71
109
+ #: inc/settings.php:83
110
+ #: inc/settings.php:95
111
+ #: inc/settings.php:107
112
+ msgid "None"
113
+ msgstr ""
114
+
115
+ #: inc/settings.php:72
116
+ #: inc/settings.php:84
117
+ #: inc/settings.php:96
118
+ #: inc/settings.php:108
119
+ msgid "Yes but not required"
120
+ msgstr ""
121
+
122
+ #: inc/settings.php:73
123
+ #: inc/settings.php:85
124
+ #: inc/settings.php:97
125
+ #: inc/settings.php:109
126
+ msgid "Required"
127
+ msgstr ""
128
+
129
+ #: inc/settings.php:78
130
+ msgid "Email address"
131
+ msgstr ""
132
+
133
+ #: inc/settings.php:79
134
+ msgid "Do you want the email address field be displayed?"
135
+ msgstr ""
136
+
137
+ #: inc/settings.php:90
138
+ #: inc/settings.php:155
139
+ #: inc/settings.php:158
140
+ msgid "Subject"
141
+ msgstr ""
142
+
143
+ #: inc/settings.php:91
144
+ msgid "Do you want the subject field be displayed?"
145
+ msgstr ""
146
+
147
+ #: inc/settings.php:102
148
+ #: inc/settings.php:161
149
+ msgid "Message"
150
+ msgstr ""
151
+
152
+ #: inc/settings.php:114
153
+ msgid "Add a reCAPTCHA"
154
+ msgstr ""
155
+
156
+ #: inc/settings.php:121
157
+ msgid "Site key"
158
+ msgstr ""
159
+
160
+ #: inc/settings.php:122
161
+ msgid "Create an account here "
162
+ msgstr ""
163
+
164
+ #: inc/settings.php:122
165
+ msgid "to get the Site key and the Secret key for the reCaptcha."
166
+ msgstr ""
167
+
168
+ #: inc/settings.php:128
169
+ msgid "Secret key"
170
+ msgstr ""
171
+
172
+ #: inc/settings.php:137
173
+ msgid "Labels"
174
+ msgstr ""
175
+
176
+ #: inc/settings.php:146
177
+ msgid "Your Name"
178
+ msgstr ""
179
+
180
+ #: inc/settings.php:149
181
+ msgid "Email"
182
+ msgstr ""
183
+
184
+ #: inc/settings.php:152
185
+ msgid "Your Email"
186
+ msgstr ""
187
+
188
+ #: inc/settings.php:164
189
+ msgid "Your message"
190
+ msgstr ""
191
+
192
+ #: inc/settings.php:167
193
+ msgid "Submit button"
194
+ msgstr ""
195
+
196
+ #: inc/settings.php:175
197
+ msgid "Messages"
198
+ msgstr ""
199
+
200
+ #: inc/settings.php:181
201
+ msgid "Name required and missing"
202
+ msgstr ""
203
+
204
+ #: inc/settings.php:184
205
+ msgid "Enter your name"
206
+ msgstr ""
207
+
208
+ #: inc/settings.php:187
209
+ msgid "E-mail required and missing"
210
+ msgstr ""
211
+
212
+ #: inc/settings.php:190
213
+ msgid "Enter a valid email"
214
+ msgstr ""
215
+
216
+ #: inc/settings.php:193
217
+ msgid "Subject required and missing"
218
+ msgstr ""
219
+
220
+ #: inc/settings.php:196
221
+ msgid "Please enter a subject"
222
+ msgstr ""
223
+
224
+ #: inc/settings.php:199
225
+ msgid "Question/comment is missing"
226
+ msgstr ""
227
+
228
+ #: inc/settings.php:202
229
+ msgid "Enter your question or comment"
230
+ msgstr ""
231
+
232
+ #: inc/settings.php:205
233
+ msgid "Successful form submission text"
234
+ msgstr ""
235
+
236
+ #: inc/settings.php:206
237
+ msgid "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."
238
+ msgstr ""
239
+
240
+ #: inc/settings.php:208
241
+ msgid "Thanks, your email was sent successfully!"
242
+ msgstr ""
243
+
244
+ #: inc/settings.php:213
245
+ msgid "Form processing options"
246
+ msgstr ""
247
+
248
+ #: inc/settings.php:219
249
+ msgid "Contact notification sender email"
250
+ msgstr ""
251
+
252
+ #: inc/settings.php:220
253
+ msgid "Email to use for the sender of the contact form emails both to the recipients below and the contact form submitter (if this is activated below). The domain for this email address should match your site's domain."
254
+ msgstr ""
255
+
256
+ #: inc/settings.php:226
257
+ msgid "Use the email address above as notification sender"
258
+ msgstr ""
259
+
260
+ #: inc/settings.php:227
261
+ msgid "When this is on, the notification emails sent from your site will come from the email address above. When this is off, the emails will come from the form submitter, making it easy to reply. If you are not receiving notifications from the site, then turn this option off as your email server might be marking them as spam."
262
+ msgstr ""
263
+
264
+ #: inc/settings.php:232
265
+ msgid "Contact submission recipients"
266
+ msgstr ""
267
+
268
+ #: inc/settings.php:233
269
+ msgid "Email address(es) to receive contact submission notifications. You can separate multiple emails with a comma."
270
+ msgstr ""
271
+
272
+ #: inc/settings.php:238
273
+ msgid "Store submissions in the database"
274
+ msgstr ""
275
+
276
+ #: inc/settings.php:239
277
+ msgid "Should the submissions be stored in the admin area? If chosen, contact form submissions will be saved in Contacts on the left (appears after this option is activated)."
278
+ msgstr ""
279
+
280
+ #: inc/settings.php:244
281
+ msgid "Use the comments blacklist to restrict submissions"
282
+ msgstr ""
283
+
284
+ #: inc/settings.php:245
285
+ msgid "Should form submission IP and email addresses be compared against the Comment Blacklist, found in"
286
+ msgstr ""
287
+
288
+ #: inc/settings.php:245
289
+ msgid "wp-admin > Settings > Discussion > Comment Blacklist?"
290
+ msgstr ""
291
+
292
+ #: inc/settings.php:250
293
+ msgid "Send email confirmation to form submitter"
294
+ msgstr ""
295
+
296
+ #: inc/settings.php:251
297
+ msgid "Adding text here will send an email to the form submitter. The email uses the \"Text to show when form is submitted...\" field below as the subject line. Plain text only here, no HTML."
298
+ msgstr ""
299
+
300
+ #: inc/settings.php:258
301
+ msgid "Use SMTP to send emails?"
302
+ msgstr ""
303
+
304
+ #: inc/settings.php:259
305
+ msgid "Instead of PHP mail function"
306
+ msgstr ""
307
+
308
+ #: inc/settings.php:264
309
+ msgid "SMTP Host"
310
+ msgstr ""
311
+
312
+ #: inc/settings.php:270
313
+ msgid "SMTP Port"
314
+ msgstr ""
315
+
316
+ #: inc/settings.php:276
317
+ msgid "Use SMTP Authentication?"
318
+ msgstr ""
319
+
320
+ #: inc/settings.php:277
321
+ msgid "If you check this box, make sure the SMTP Username and SMTP Password are completed."
322
+ msgstr ""
323
+
324
+ #: inc/settings.php:282
325
+ msgid "SMTP Username"
326
+ msgstr ""
327
+
328
+ #: inc/settings.php:288
329
+ msgid "SMTP Password"
330
+ msgstr ""
331
+
332
+ #: inc/settings.php:306
333
+ msgid "Pirate Forms settings"
334
+ msgstr ""
335
+
336
+ #: inc/settings.php:307
337
+ #: inc/widget.php:15
338
+ #: inc/widget.php:16
339
+ msgid "Pirate Forms"
340
+ msgstr ""
341
+
342
+ #: inc/settings.php:503
343
+ msgid "Save changes"
344
+ msgstr ""
345
+
346
+ #: inc/widget.php:75
347
+ msgid "Title"
348
+ msgstr ""
349
+
350
+ #: inc/widget.php:76
351
+ msgid "Text above form"
352
+ msgstr ""
353
+
354
+ #: inc/widget.php:79
355
+ msgid "Title:"
356
+ msgstr ""
357
+
358
+ #: inc/widget.php:83
359
+ msgid "Subtext:"
360
+ msgstr ""
361
+
pirate-forms.php ADDED
@@ -0,0 +1,740 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Pirate Forms
4
+ Plugin URI: http://themeisle.com/plugins/pirate-forms/
5
+ Description: Easily creates a nice looking, simple contact form on your WP site.
6
+ Version: 1.0.3
7
+ Author: Themeisle
8
+ Author URI: http://themeisle.com
9
+ Text Domain: pirate-forms
10
+ Domain Path: /languages
11
+ License: GPLv2
12
+ License URI: https://www.gnu.org/licenses/gpl-2.0.html
13
+ */
14
+
15
+ if ( ! function_exists( 'add_action' ) ) {
16
+ die( 'Nothing to do...' );
17
+ }
18
+
19
+ /* Important constants */
20
+ define( 'PIRATE_FORMS_VERSION', '1.0.0' );
21
+ define( 'PIRATE_FORMS_URL', plugin_dir_url( __FILE__ ) );
22
+
23
+ /* Required helper functions */
24
+ include_once( dirname( __FILE__ ) . '/inc/helpers.php' );
25
+ include_once( dirname( __FILE__ ) . '/inc/settings.php' );
26
+ include_once( dirname( __FILE__ ) . '/inc/widget.php' );
27
+
28
+ add_action( 'plugins_loaded', 'pirate_forms_load_textdomain' );
29
+ /**
30
+ * Load plugin textdomain.
31
+ *
32
+ * @since 1.0.0
33
+ */
34
+ function pirate_forms_load_textdomain() {
35
+ load_plugin_textdomain( 'pirate-forms', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
36
+ }
37
+
38
+ /**
39
+ * Display the contact form or a confirmation message if submitted
40
+ *
41
+ * @param $atts
42
+ * @param null $content
43
+ *
44
+ * @return string
45
+ */
46
+ add_shortcode( 'pirate_forms', 'pirate_forms_display_form' );
47
+
48
+ function pirate_forms_display_form( $atts, $content = NULL ) {
49
+
50
+ /* thank you message */
51
+ $pirate_forms_thankyou_message = '';
52
+
53
+ if ( isset( $_GET['pcf'] ) && $_GET['pcf'] == 1 ) {
54
+ $pirate_forms_thankyou_message .= '
55
+ <div class="pirate_forms_thankyou_wrap">
56
+ <p>' . sanitize_text_field( pirate_forms_get_key( 'pirateformsopt_label_submit' ) ) . '</p>
57
+ </div>';
58
+ }
59
+
60
+ /*********************************/
61
+ /********** FormBuilder **********/
62
+ /*********************************/
63
+
64
+ if ( !class_exists('PhpFormBuilder')) {
65
+ require_once( dirname( __FILE__ ) . '/inc/PhpFormBuilder.php' );
66
+ }
67
+
68
+ $pirate_form = new PhpFormBuilder();
69
+
70
+ $pirate_form->set_att( 'id', 'pirate_forms_' . ( get_the_id() ? get_the_id() : 1 ) );
71
+ $pirate_form->set_att( 'class', array( 'pirate_forms' ) );
72
+ $pirate_form->set_att( 'add_nonce', get_bloginfo( 'admin_email' ) );
73
+
74
+ $pirate_forms_options = get_option( 'pirate_forms_settings_array' );
75
+
76
+ if( !empty($pirate_forms_options) ):
77
+
78
+ /* Count the number of requested fields from Name, Email and Subject to add a certain class col-12, col-6 or col-4 */
79
+ $pirate_forms_required_fields = 0;
80
+
81
+ if( !empty($pirate_forms_options['pirateformsopt_name_field']) && !empty($pirate_forms_options['pirateformsopt_label_name']) ):
82
+
83
+ $pirateformsopt_name_field = $pirate_forms_options['pirateformsopt_name_field'];
84
+ $pirateformsopt_name_label = $pirate_forms_options['pirateformsopt_label_name'];
85
+
86
+ if ( !empty($pirateformsopt_name_field) && !empty($pirateformsopt_name_label) && ($pirateformsopt_name_field != '') ):
87
+ $pirate_forms_required_fields++;
88
+ endif;
89
+
90
+ endif;
91
+
92
+ if( !empty($pirate_forms_options['pirateformsopt_email_field']) && !empty($pirate_forms_options['pirateformsopt_label_email']) ):
93
+
94
+ $pirateformsopt_email_field = $pirate_forms_options['pirateformsopt_email_field'];
95
+ $pirateformsopt_email_label = $pirate_forms_options['pirateformsopt_label_email'];
96
+
97
+ if ( !empty($pirateformsopt_email_field) && !empty($pirateformsopt_email_label) && ($pirateformsopt_email_field != '') ):
98
+ $pirate_forms_required_fields++;
99
+ endif;
100
+
101
+ endif;
102
+
103
+ if( !empty($pirate_forms_options['pirateformsopt_subject_field']) && !empty($pirate_forms_options['pirateformsopt_label_subject']) ):
104
+
105
+ $pirateformsopt_subject_field = $pirate_forms_options['pirateformsopt_subject_field'];
106
+ $pirateformsopt_subject_label = $pirate_forms_options['pirateformsopt_label_subject'];
107
+
108
+ if ( !empty($pirateformsopt_subject_field) && !empty($pirateformsopt_subject_label) && ($pirateformsopt_subject_field != '') ):
109
+ $pirate_forms_required_fields++;
110
+ endif;
111
+
112
+ endif;
113
+
114
+ $pirate_forms_layout_input = '';
115
+
116
+ switch ($pirate_forms_required_fields) {
117
+ case 1:
118
+ $pirate_forms_layout_input = 'col-lg-12 col-sm-12';
119
+ break;
120
+ case 2:
121
+ $pirate_forms_layout_input = 'col-lg-6 col-sm-6';
122
+ break;
123
+ case 3:
124
+ $pirate_forms_layout_input = 'col-lg-4 col-sm-4';
125
+ break;
126
+ default:
127
+ $pirate_forms_layout_input = 'col-lg-4 col-sm-4';
128
+ }
129
+
130
+ /******************************/
131
+ /******** Name field *********/
132
+ /******************************/
133
+
134
+ if ( !empty($pirateformsopt_name_field) && !empty($pirateformsopt_name_label) ):
135
+
136
+ $required = $pirateformsopt_name_field === 'req' ? TRUE : FALSE;
137
+ $wrap_classes = array( 'form_field_wrap', 'contact_name_wrap '.$pirate_forms_layout_input );
138
+
139
+ // If this field was submitted with invalid data
140
+ if ( isset( $_SESSION['pirate_forms_contact_errors']['contact-name'] ) ) {
141
+ $wrap_classes[] = 'error';
142
+ }
143
+
144
+ $pirate_form->add_input(
145
+ '',
146
+ array(
147
+ 'placeholder' => stripslashes( sanitize_text_field($pirateformsopt_name_label) ),
148
+ 'required' => $required,
149
+ 'wrap_class' => $wrap_classes,
150
+ ),
151
+ 'pirate-forms-contact-name'
152
+ );
153
+
154
+ endif;
155
+
156
+ /********************************/
157
+ /******** Email field **********/
158
+ /********************************/
159
+
160
+ if ( !empty($pirateformsopt_email_field) && !empty($pirateformsopt_email_label) ):
161
+
162
+ $required = $pirateformsopt_email_field === 'req' ? TRUE : FALSE;
163
+ $wrap_classes = array( 'form_field_wrap', 'contact_email_wrap '.$pirate_forms_layout_input );
164
+
165
+ // If this field was submitted with invalid data
166
+ if ( isset( $_SESSION['pirate_forms_contact_errors']['contact-email'] ) ) {
167
+ $wrap_classes[] = 'error';
168
+ }
169
+
170
+ $pirate_form->add_input(
171
+ '',
172
+ array(
173
+ 'placeholder' => stripslashes( sanitize_text_field($pirateformsopt_email_label) ),
174
+ 'required' => $required,
175
+ 'type' => 'email',
176
+ 'wrap_class' => $wrap_classes,
177
+ ),
178
+ 'pirate-forms-contact-email'
179
+ );
180
+
181
+ endif;
182
+
183
+ /********************************/
184
+ /******** Subject field ********/
185
+ /********************************/
186
+
187
+ if ( !empty($pirateformsopt_subject_field) && !empty($pirateformsopt_subject_label) ):
188
+
189
+ $required = $pirateformsopt_subject_field === 'req' ? TRUE : FALSE;
190
+ $wrap_classes = array( 'form_field_wrap', 'contact_subject_wrap'.$pirate_forms_layout_input );
191
+
192
+ // If this field was submitted with invalid data
193
+ if ( isset( $_SESSION['pirate_forms_contact_errors']['contact-subject'] ) ) {
194
+ $wrap_classes[] = 'error';
195
+ }
196
+
197
+ $pirate_form->add_input(
198
+ '',
199
+ array(
200
+ 'placeholder' => stripslashes( sanitize_text_field($pirateformsopt_subject_label) ),
201
+ 'required' => $required,
202
+ 'wrap_class' => $wrap_classes,
203
+ ),
204
+ 'pirate-forms-contact-subject'
205
+ );
206
+
207
+ endif;
208
+
209
+ /********************************/
210
+ /******** Message field ********/
211
+ /********************************/
212
+
213
+ if( !empty($pirate_forms_options['pirateformsopt_message_field']) && !empty($pirate_forms_options['pirateformsopt_label_message']) ):
214
+
215
+ $pirateformsopt_message_field = $pirate_forms_options['pirateformsopt_message_field'];
216
+ $pirateformsopt_message_label = $pirate_forms_options['pirateformsopt_label_message'];
217
+
218
+ if ( !empty($pirateformsopt_message_field) && !empty($pirateformsopt_message_label) ):
219
+
220
+
221
+ $required = $pirateformsopt_message_field === 'req' ? TRUE : FALSE;
222
+ $wrap_classes = array( 'form_field_wrap', 'contact_message_wrap col-lg-12 col-sm-12' );
223
+
224
+ // If this field was submitted with invalid data
225
+ if ( isset( $_SESSION['pirate_forms_contact_errors']['contact-message'] ) ) {
226
+ $wrap_classes[] = 'error';
227
+ }
228
+
229
+ $pirate_form->add_input(
230
+ '',
231
+ array(
232
+ 'placeholder' => stripslashes( sanitize_text_field($pirateformsopt_message_label) ),
233
+ 'required' => $required,
234
+ 'wrap_class' => $wrap_classes,
235
+ 'type' => 'textarea'
236
+ ),
237
+ 'pirate-forms-contact-message'
238
+ );
239
+
240
+ endif;
241
+ endif;
242
+
243
+ /********************************/
244
+ /******** Submit button ********/
245
+ /********************************/
246
+
247
+ if( !empty($pirate_forms_options['pirateformsopt_label_submit_btn']) ):
248
+
249
+ $pirateformsopt_label_submit_btn = $pirate_forms_options['pirateformsopt_label_submit_btn'];
250
+
251
+ if ( !empty($pirateformsopt_label_submit_btn) ):
252
+
253
+ $wrap_classes = array();
254
+
255
+ $pirate_form->add_input(
256
+ '',
257
+ array(
258
+ 'value' => stripslashes( sanitize_text_field($pirateformsopt_label_submit_btn) ),
259
+ 'wrap_class' => $wrap_classes,
260
+ 'type' => 'submit',
261
+ 'wrap_tag' => '',
262
+ 'class' => 'pirate-forms-submit-button'
263
+ ),
264
+ 'pirate-forms-contact-submit'
265
+ );
266
+
267
+ endif;
268
+ endif;
269
+
270
+ /******************************/
271
+ /********* ReCaptcha **********/
272
+ /******************************/
273
+
274
+ if( !empty($pirate_forms_options['pirateformsopt_recaptcha_secretkey']) && !empty($pirate_forms_options['pirateformsopt_recaptcha_sitekey']) && !empty($pirate_forms_options['pirateformsopt_recaptcha_field']) && ($pirate_forms_options['pirateformsopt_recaptcha_field'] == 'yes') ):
275
+
276
+ $pirateformsopt_recaptcha_sitekey = $pirate_forms_options['pirateformsopt_recaptcha_sitekey'];
277
+ $pirateformsopt_recaptcha_secretkey = $pirate_forms_options['pirateformsopt_recaptcha_secretkey'];
278
+
279
+ $pirate_form->add_input(
280
+ '',
281
+ array(
282
+ 'value' => $pirateformsopt_recaptcha_sitekey,
283
+ 'type' => 'captcha'
284
+ ),
285
+ 'pirate-forms-captcha'
286
+ );
287
+
288
+ endif;
289
+ endif;
290
+
291
+ /* Referring site or page, if any */
292
+ if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) {
293
+ $pirate_form->add_input(
294
+ __( 'Contact Referrer','pirate-forms' ),
295
+ array(
296
+ 'type' => 'hidden',
297
+ 'value' => $_SERVER['HTTP_REFERER']
298
+ )
299
+ );
300
+ }
301
+
302
+ /* Referring page, if sent via URL query */
303
+ if ( ! empty( $_REQUEST['src'] ) || ! empty( $_REQUEST['ref'] ) ) {
304
+ $pirate_form->add_input(
305
+ __( 'Referring page','pirate-forms' ),
306
+ array(
307
+ 'type' => 'hidden',
308
+ 'value' => ! empty( $_REQUEST['src'] ) ? $_REQUEST['src'] : $_REQUEST['ref']
309
+ )
310
+ );
311
+ }
312
+
313
+ /* Are there any submission errors? */
314
+ $errors = '';
315
+ if ( ! empty( $_SESSION['pirate_forms_contact_errors'] ) ) {
316
+ $errors = pirate_forms_display_errors( $_SESSION['pirate_forms_contact_errors'] );
317
+ unset( $_SESSION['pirate_forms_contact_errors'] );
318
+ }
319
+
320
+ /* Display the form */
321
+ return $pirate_forms_thankyou_message.'
322
+ <div class="pirate_forms_wrap">
323
+ ' . $errors . '
324
+ ' . $pirate_form->build_form( FALSE ) . '
325
+ </div>';
326
+
327
+ }
328
+
329
+ /**
330
+ * Process the incoming contact form data, if any
331
+ */
332
+ add_action( 'template_redirect', 'pirate_forms_process_contact' );
333
+ function pirate_forms_process_contact() {
334
+
335
+ // If POST, nonce and honeypot are not set, beat it
336
+ if ( empty( $_POST ) || empty( $_POST['wordpress-nonce'] ) || !isset( $_POST['honeypot'] )) {
337
+ return false;
338
+ }
339
+
340
+ // Session variable for form errors
341
+ $_SESSION['pirate_forms_contact_errors'] = array();
342
+
343
+ // If nonce is not valid, beat it
344
+ if ( ! wp_verify_nonce( $_POST['wordpress-nonce'], get_bloginfo( 'admin_email' ) ) ) {
345
+ $_SESSION['pirate_forms_contact_errors']['nonce'] = __( 'Nonce failed!', 'pirate-forms' );
346
+ return false;
347
+ }
348
+
349
+ // If the honeypot caught a bear, beat it
350
+ if ( ! empty( $_POST['honeypot'] ) ) {
351
+ $_SESSION['pirate_forms_contact_errors']['honeypot'] = __( 'Form submission failed!', 'pirate-forms' );
352
+ return false;
353
+ }
354
+
355
+ // Start the body of the contact email
356
+ $body = "*** " . __( 'Contact form submission on', 'pirate-forms' ) . " " .
357
+ get_bloginfo( 'name' ) . " (" . site_url() . ") *** \n\n";
358
+
359
+
360
+ /***********************************************/
361
+ /********* Sanitize and validate name *******/
362
+ /**********************************************/
363
+
364
+ $pirate_forms_contact_name = isset( $_POST['pirate-forms-contact-name'] ) ? sanitize_text_field( trim( $_POST['pirate-forms-contact-name'] ) ) : '';
365
+
366
+ // if name is required and is missing
367
+ if ( (pirate_forms_get_key( 'pirateformsopt_name_field' ) === 'req') && empty( $pirate_forms_contact_name ) ) {
368
+ $_SESSION['pirate_forms_contact_errors']['pirate-forms-contact-name'] = pirate_forms_get_key( 'pirateformsopt_label_err_name' );
369
+ }
370
+ // If not required and empty, leave it out
371
+ elseif ( ! empty( $pirate_forms_contact_name ) ) {
372
+ $body .= stripslashes( pirate_forms_get_key( 'pirateformsopt_label_name' ) ) . ": $pirate_forms_contact_name \r";
373
+ }
374
+
375
+
376
+ /***********************************************/
377
+ /******* Sanitize and validate email **********/
378
+ /***********************************************/
379
+
380
+ $pirate_forms_contact_email = isset( $_POST['pirate-forms-contact-email'] ) ? sanitize_email( $_POST['pirate-forms-contact-email'] ) : '';
381
+
382
+ // If required, is it valid?
383
+ if ( (pirate_forms_get_key( 'pirateformsopt_email_field' ) === 'req') && ! filter_var( $pirate_forms_contact_email, FILTER_VALIDATE_EMAIL )) {
384
+ $_SESSION['pirate_forms_contact_errors']['pirate-forms-contact-email'] = pirate_forms_get_key( 'pirateformsopt_label_err_email' );
385
+ }
386
+ // If not required and empty, leave it out
387
+ elseif ( ! empty( $pirate_forms_contact_email ) ) {
388
+ $body .= stripslashes( pirate_forms_get_key( 'pirateformsopt_label_email' ) )
389
+ . ": $pirate_forms_contact_email \r";
390
+ }
391
+
392
+ /***********************************************/
393
+ /********* Sanitize and validate subject *****/
394
+ /**********************************************/
395
+
396
+ $pirate_forms_contact_subject = isset( $_POST['pirate-forms-contact-subject'] ) ? sanitize_text_field( trim( $_POST['pirate-forms-contact-subject'] ) ) : '';
397
+
398
+ // if subject is required and is missing
399
+ if ( (pirate_forms_get_key( 'pirateformsopt_subject_field' ) === 'req') && empty( $pirate_forms_contact_subject ) ) {
400
+ $_SESSION['pirate_forms_contact_errors']['pirate-forms-contact-subject'] = pirate_forms_get_key( 'pirateformsopt_label_err_subject' );
401
+ }
402
+ // If not required and empty, leave it out
403
+ elseif ( ! empty( $pirate_forms_contact_subject ) ) {
404
+ $body .= stripslashes( pirate_forms_get_key( 'pirateformsopt_label_subject' ) ) . ": $pirate_forms_contact_subject \r";
405
+ }
406
+
407
+ /***********************************************/
408
+ /********* Sanitize and validate message *****/
409
+ /**********************************************/
410
+
411
+ $pirate_forms_contact_message = isset( $_POST['pirate-forms-contact-message'] ) ? sanitize_text_field( trim( $_POST['pirate-forms-contact-message'] ) ) : '';
412
+
413
+ // if message is required and is missing
414
+ if ( (pirate_forms_get_key( 'pirateformsopt_message_field' ) === 'req') && empty( $pirate_forms_contact_message ) ) {
415
+ $_SESSION['pirate_forms_contact_errors']['pirate-forms-contact-message'] = pirate_forms_get_key( 'pirateformsopt_label_err_message' );
416
+ }
417
+ // If not required and empty, leave it out
418
+ elseif ( ! empty( $pirate_forms_contact_message ) ) {
419
+ $body .= stripslashes( pirate_forms_get_key( 'pirateformsopt_label_message' ) ) . ": $pirate_forms_contact_message \r";
420
+ }
421
+
422
+ /*************************************************/
423
+ /************* Validate reCAPTCHA ****************/
424
+ /*************************************************/
425
+
426
+
427
+ $pirateformsopt_recaptcha_sitekey = pirate_forms_get_key('pirateformsopt_recaptcha_sitekey');
428
+ $pirateformsopt_recaptcha_secretkey = pirate_forms_get_key('pirateformsopt_recaptcha_secretkey');
429
+ $pirateformsopt_recaptcha_field = pirate_forms_get_key('pirateformsopt_recaptcha_field');
430
+
431
+ if( !empty($pirateformsopt_recaptcha_secretkey) && !empty($pirateformsopt_recaptcha_sitekey) && !empty($pirateformsopt_recaptcha_field) && ($pirateformsopt_recaptcha_field == 'yes') ):
432
+
433
+ if( isset($_POST['g-recaptcha-response']) ){
434
+ $captcha = $_POST['g-recaptcha-response'];
435
+ }
436
+ if( !$captcha ){
437
+ $_SESSION['pirate_forms_contact_errors']['pirate-forms-captcha'] = __( 'Wrong reCAPTCHA','pirate-forms' );
438
+ }
439
+ $response = wp_remote_get( "https://www.google.com/recaptcha/api/siteverify?secret=".$pirateformsopt_recaptcha_secretkey."&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR'] );
440
+
441
+ if( !empty($response) ):
442
+ $response_body = wp_remote_retrieve_body( $response );
443
+ endif;
444
+
445
+ if( !empty($response_body) ):
446
+ $result = json_decode( $response_body, true );
447
+ endif;
448
+
449
+ if( isset($result['success']) && ($result['success'] == false) ) {
450
+ $_SESSION['pirate_forms_contact_errors']['pirate-forms-captcha'] = __( 'Wrong reCAPTCHA','pirate-forms' );
451
+ }
452
+ endif;
453
+
454
+ /************************************************/
455
+ /********** Validate recipients email ***********/
456
+ /************************************************/
457
+ $site_recipients = sanitize_text_field( pirate_forms_get_key( 'pirateformsopt_email_recipients' ) );
458
+
459
+
460
+ if ( empty($site_recipients) ) {
461
+ $_SESSION['pirate_forms_contact_errors']['pirate-forms-recipients-email'] = __( 'Please enter one or more Contact submission recipients','pirate-forms' );
462
+ }
463
+
464
+ /**********************************************/
465
+ /******** Sanitize and validate IP *********/
466
+ /**********************************************/
467
+
468
+ $contact_ip = filter_var( $_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP );
469
+
470
+ // If valid and present, create a link to an IP search
471
+ if ( ! empty( $contact_ip ) ) {
472
+ $body .= "IP address: $contact_ip \r IP search: http://whatismyipaddress.com/ip/$contact_ip \n\n";
473
+ }
474
+
475
+ // Sanitize and prepare referrer;
476
+ if ( ! empty( $_POST['pirate-forms-contact-referrer'] ) ) {
477
+ $body .= "Came from: " . sanitize_text_field( $_POST['pirate-forms-contact-referrer'] ) . " \r";
478
+ }
479
+
480
+ // Show the page this contact form was submitted on
481
+ $body .= 'Sent from page: ' . get_permalink( get_the_id() );
482
+
483
+ // Check the blacklist
484
+ $blocked = pirate_forms_get_blacklist();
485
+ if ( ! empty( $blocked ) ) {
486
+ if (
487
+ in_array( $pirate_forms_contact_email, $blocked ) ||
488
+ in_array( $contact_ip, $blocked )
489
+ ) {
490
+ $_SESSION['pirate_forms_contact_errors']['blacklist-blocked'] = __( 'Form submission blocked!','pirate-forms' );
491
+ return false;
492
+ }
493
+ }
494
+
495
+ // No errors? Go ahead and process the contact
496
+ if ( empty( $_SESSION['pirate_forms_contact_errors'] ) ) {
497
+
498
+ $site_email = sanitize_email( pirate_forms_get_key( 'pirateformsopt_email' ) );
499
+ $site_name = htmlspecialchars_decode( get_bloginfo( 'name' ) );
500
+
501
+ // Notification recipients
502
+ $site_recipients = sanitize_text_field( pirate_forms_get_key( 'pirateformsopt_email_recipients' ) );
503
+ $site_recipients = explode(',', $site_recipients);
504
+ $site_recipients = array_map( 'trim', $site_recipients );
505
+ $site_recipients = array_map( 'sanitize_email', $site_recipients );
506
+ $site_recipients = implode( ',', $site_recipients );
507
+
508
+ // No name? Use the submitter email address, if one is present
509
+ if ( empty( $pirate_forms_contact_name ) ) {
510
+ $pirate_forms_contact_name = ! empty( $pirate_forms_contact_email ) ? $pirate_forms_contact_email : '[None given]';
511
+ }
512
+
513
+ // Need an email address for the email notification
514
+ if ( pirate_forms_get_key( 'pirateformsopt_reply_to_admin' ) == 'yes' ) {
515
+ $send_from = $site_email;
516
+ $send_from_name = $site_name;
517
+ } else {
518
+ $send_from = ! empty( $pirate_forms_contact_email ) ? $pirate_forms_contact_email : $site_email;
519
+ $send_from_name = $pirate_forms_contact_name;
520
+ }
521
+
522
+ // Sent an email notification to the correct address
523
+ $headers = "From: $send_from_name <$send_from>\r\nReply-To: $send_from_name <$send_from>";
524
+
525
+ add_action( 'phpmailer_init', 'pirate_forms_phpmailer' );
526
+
527
+ function pirate_forms_phpmailer( $phpmailer ) {
528
+
529
+ $pirateformsopt_use_smtp = pirate_forms_get_key( 'pirateformsopt_use_smtp' );
530
+ $pirateformsopt_smtp_host = pirate_forms_get_key( 'pirateformsopt_smtp_host' );
531
+ $pirateformsopt_smtp_port = pirate_forms_get_key( 'pirateformsopt_smtp_port' );
532
+ $pirateformsopt_smtp_username = pirate_forms_get_key( 'pirateformsopt_smtp_username' );
533
+ $pirateformsopt_smtp_password = pirate_forms_get_key( 'pirateformsopt_smtp_password' );
534
+ $pirateformsopt_use_smtp_authentication = pirate_forms_get_key('pirateformsopt_use_smtp_authentication');
535
+
536
+ if( !empty($pirateformsopt_use_smtp) && ($pirateformsopt_use_smtp == 'yes') && !empty($pirateformsopt_smtp_host) && !empty($pirateformsopt_smtp_port) ):
537
+
538
+ $phpmailer->isSMTP();
539
+ $phpmailer->Host = $pirateformsopt_smtp_host;
540
+
541
+ if( !empty($pirateformsopt_use_smtp_authentication) && ($pirateformsopt_use_smtp_authentication == 'yes') && !empty($pirateformsopt_smtp_username) && !empty($pirateformsopt_smtp_password) ):
542
+
543
+ $phpmailer->SMTPAuth = true; // Force it to use Username and Password to authenticate
544
+ $phpmailer->Port = $pirateformsopt_smtp_port;
545
+ $phpmailer->Username = $pirateformsopt_smtp_username;
546
+ $phpmailer->Password = $pirateformsopt_smtp_password;
547
+
548
+ endif;
549
+
550
+ endif;
551
+ }
552
+
553
+ wp_mail( $site_recipients, 'Contact on ' . $site_name, $body, $headers );
554
+
555
+ // Should a confirm email be sent?
556
+ $confirm_body = stripslashes( trim( pirate_forms_get_key( 'pirateformsopt_confirm_email' ) ) );
557
+ if ( ! empty( $confirm_body ) && ! empty( $pirate_forms_contact_email ) ) {
558
+
559
+ // Removing entities
560
+ $confirm_body = htmlspecialchars_decode( $confirm_body );
561
+ $confirm_body = html_entity_decode( $confirm_body );
562
+ $confirm_body = str_replace( '&#39;', "'", $confirm_body );
563
+
564
+ $headers = "From: $site_name <$site_email>\r\nReply-To: $site_name <$site_email>";
565
+
566
+ wp_mail(
567
+ $pirate_forms_contact_email,
568
+ pirate_forms_get_key( 'pirateformsopt_label_submit' ) . ' - ' . $site_name,
569
+ $confirm_body,
570
+ $headers
571
+ );
572
+ }
573
+
574
+ /************************************************************/
575
+ /************* Store the entries in the DB ****************/
576
+ /************************************************************/
577
+
578
+ if ( pirate_forms_get_key( 'pirateformsopt_store' ) === 'yes' ) {
579
+ $new_post_id = wp_insert_post(
580
+ array(
581
+ 'post_type' => 'pf_contact',
582
+ 'post_title' => date( 'l, M j, Y', time() ) . ' by "' . $pirate_forms_contact_name . '"',
583
+ 'post_content' => $body,
584
+ 'post_author' => 1,
585
+ 'post_status' => 'private'
586
+ )
587
+ );
588
+
589
+ if ( isset( $pirate_forms_contact_email ) && ! empty( $pirate_forms_contact_email ) ) {
590
+ add_post_meta( $new_post_id, 'Contact email', $pirate_forms_contact_email );
591
+ }
592
+ }
593
+
594
+
595
+ $redirect = $_SERVER["HTTP_REFERER"] . ( strpos( $_SERVER["HTTP_REFERER"], '?' ) === FALSE ? '?' : '&' ) . 'pcf=1#contact';
596
+
597
+
598
+ wp_safe_redirect( $redirect );
599
+
600
+ }
601
+
602
+ }
603
+
604
+ /* Get a settings value */
605
+ function pirate_forms_get_key( $id ) {
606
+ $pirate_forms_options = get_option( 'pirate_forms_settings_array' );
607
+
608
+ return isset( $pirate_forms_options[$id] ) ? $pirate_forms_options[$id] : '';
609
+ }
610
+
611
+ /*************************************************************************/
612
+ /**************************** Scripts and Styles *************************/
613
+ /*************************************************************************/
614
+
615
+
616
+ add_action( 'wp_enqueue_scripts', 'pirate_forms_add_styles_and_scripts' );
617
+
618
+ function pirate_forms_add_styles_and_scripts() {
619
+
620
+ /* style for frontpage contact */
621
+ wp_enqueue_style( 'pirate_forms_front_styles', PIRATE_FORMS_URL . 'css/front.css' );
622
+
623
+ /* recaptcha js */
624
+ $pirate_forms_options = get_option( 'pirate_forms_settings_array' );
625
+
626
+ if( !empty($pirate_forms_options) ):
627
+
628
+ if( !empty($pirate_forms_options['pirateformsopt_recaptcha_secretkey']) && !empty($pirate_forms_options['pirateformsopt_recaptcha_sitekey']) && !empty($pirate_forms_options['pirateformsopt_recaptcha_field']) && ($pirate_forms_options['pirateformsopt_recaptcha_field'] == 'yes') ):
629
+
630
+ wp_enqueue_script( 'recaptcha', 'https://www.google.com/recaptcha/api.js' );
631
+
632
+ wp_enqueue_script( 'pirate_forms_scripts', plugins_url( 'js/scripts.js', __FILE__ ), array('jquery','recaptcha') );
633
+
634
+ endif;
635
+
636
+ endif;
637
+
638
+ wp_enqueue_script( 'pirate_forms_scripts_general', plugins_url( 'js/scripts-general.js', __FILE__ ), array('jquery') );
639
+
640
+ $pirate_forms_errors = '';
641
+
642
+ if( !empty($_SESSION['pirate_forms_contact_errors'])):
643
+ $pirate_forms_errors = $_SESSION['pirate_forms_contact_errors'];
644
+ endif;
645
+
646
+ wp_localize_script( 'pirate_forms_scripts_general', 'pirateFormsObject', array(
647
+ 'errors' => $pirate_forms_errors
648
+ ) );
649
+ }
650
+
651
+ add_action( 'admin_enqueue_scripts', 'pirate_forms_admin_css' );
652
+
653
+ function pirate_forms_admin_css() {
654
+
655
+ global $pagenow;
656
+
657
+ if ( !empty($pagenow) && ( $pagenow == 'options-general.php' || $pagenow == 'admin.php' )
658
+ && isset( $_GET['page'] ) && $_GET['page'] == 'pirate-forms-admin' ) {
659
+
660
+ wp_enqueue_style( 'pirate_forms_admin_styles', PIRATE_FORMS_URL . 'css/wp-admin.css' );
661
+
662
+ wp_enqueue_script( 'pirate_forms_scripts_admin', plugins_url( 'js/scripts-admin.js', __FILE__ ), array('jquery') );
663
+ wp_localize_script( 'pirate_forms_scripts_admin', 'cwp_top_ajaxload', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );
664
+ }
665
+ }
666
+
667
+ /**************************************************************************/
668
+ /*** If submissions should be stored in the DB, create the Contacts CPT ***/
669
+ /*************************************************************************/
670
+
671
+ if ( pirate_forms_get_key( 'pirateformsopt_store' ) === 'yes' ) {
672
+
673
+ add_action( 'init', 'pirate_forms_register_content_type' );
674
+
675
+ function pirate_forms_register_content_type() {
676
+
677
+ $labels = array(
678
+ 'name' => _x( 'Contacts', 'post type general name', 'pirate-forms' ),
679
+ 'singular_name' => _x( 'Contact', 'post type singular name', 'pirate-forms' ),
680
+ 'menu_name' => _x( 'Contacts', 'admin menu', 'pirate-forms' ),
681
+ 'name_admin_bar' => _x( 'Contact', 'add new on admin bar', 'pirate-forms' ),
682
+ 'add_new' => _x( 'Add New', 'contact', 'pirate-forms' ),
683
+ 'add_new_item' => __( 'Add New Contact', 'pirate-forms' ),
684
+ 'new_item' => __( 'New Contact', 'pirate-forms' ),
685
+ 'edit_item' => __( 'Edit Contact', 'pirate-forms' ),
686
+ 'view_item' => __( 'View Contact', 'pirate-forms' ),
687
+ 'all_items' => __( 'All Contacts', 'pirate-forms' ),
688
+ 'search_items' => __( 'Search Contacts', 'pirate-forms' ),
689
+ 'parent_item_colon' => __( 'Parent Contacts:', 'pirate-forms' ),
690
+ 'not_found' => __( 'No contacts found.', 'pirate-forms' ),
691
+ 'not_found_in_trash' => __( 'No contacts found in Trash.', 'pirate-forms' )
692
+ );
693
+ $args = array(
694
+ 'labels' => $labels,
695
+ 'description' => __( 'Contacts from Pirate Forms', 'pirate-forms' ),
696
+ 'public' => true,
697
+ 'publicly_queryable' => true,
698
+ 'show_ui' => true,
699
+ 'show_in_menu' => true,
700
+ 'query_var' => true,
701
+ 'capability_type' => 'post',
702
+ 'has_archive' => true,
703
+ 'hierarchical' => false,
704
+ 'menu_position' => null,
705
+ 'supports' => array( 'title', 'editor', 'custom-fields' )
706
+ );
707
+
708
+ register_post_type( 'pf_contact', $args );
709
+ }
710
+
711
+ }
712
+
713
+ /**
714
+ * Add a Settings link in the plugins list for the Pirate Forms
715
+ */
716
+ function pirate_forms_add_settings_link( $links ) {
717
+ $settings_link = '<a href="options-general.php?page=pirate-forms-admin">' . __( 'Settings','pirate-forms' ) . '</a>';
718
+ if (function_exists('array_unshift')):
719
+ array_unshift( $links, $settings_link );
720
+ else:
721
+ array_push( $links, $settings_link );
722
+ endif;
723
+ return $links;
724
+ }
725
+ $plugin = plugin_basename( __FILE__ );
726
+ add_filter( "plugin_action_links_$plugin", 'pirate_forms_add_settings_link' );
727
+
728
+ /**
729
+ * Allow [pirate_forms] shortcode in text widget
730
+ */
731
+ add_filter( 'widget_text', 'pirate_forms_widget_text_filter', 9 );
732
+
733
+ function pirate_forms_widget_text_filter( $content ) {
734
+ if ( ! preg_match( '[pirate_forms]', $content ) )
735
+ return $content;
736
+
737
+ $content = do_shortcode( $content );
738
+
739
+ return $content;
740
+ }
readme.txt ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Pirate Forms ===
2
+ Contributors: themeisle, codeinwp
3
+ Tags: contact, contact form, contact form widget
4
+ Requires at least: 3.0
5
+ Tested up to: 4.3
6
+ License: GPLv2 or later
7
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
+
9
+ Makes your contact page more engaging by creating a good-looking contact form on your website. The interaction with your visitors was never easier.
10
+
11
+ == Description ==
12
+
13
+ Stay in touch with your visitors very easily. Pirate Forms offers you a great and friendly contact form for your website.
14
+ This is an easy-to-use WordPress contact form plugin. To create a contact form you just need to use the [pirate_forms] shortcode or the 'Pirate Forms' widget.
15
+ This plugin is a fork of https://wordpress.org/plugins/proper-contact-form/
16
+
17
+ Features:
18
+
19
+ - It's easy to use
20
+
21
+ Pirate Forms is very easy to set up. You can quickly create an engaging contact form by using a shortcode and copying it where you want it to appear.
22
+
23
+ - It's fully customizable
24
+
25
+ Pirate Forms plugin allows you to customize everything you want. You can change the field labels and decide what message to tell your visitors when an error shows up. You can also decide which fields are required and which are not.
26
+
27
+ - Provides reCaptcha
28
+
29
+ Avoid spam messages and make sure the e-mails you receive are entirely addressed to you.
30
+
31
+ - Comes with SMTP
32
+
33
+ With the SMTP option, you can be sure you won’t miss any e-mail from your visitors. The messages will be safely delivered from the source to your personal e-mail address.
34
+
35
+ - Stores contacts in special databases
36
+
37
+ You can keep all the contacts in an archive by saving their e-mail addresses. Pirate Forms allows you to do that by providing contact databases.
38
+
39
+ A simple to use WordPress plugin for creating a contact form using the [pirate_forms] shortcode or the 'Pirate Forms' widget.
40
+
41
+ Features:
42
+
43
+ - Choosing the fields(required or not)
44
+ - Choosing the labels
45
+ - Choosing error messages
46
+ - reCAPTCHA
47
+ - Store the contacts in the database
48
+
49
+ == Installation ==
50
+
51
+ Activating the Pirate Forms plugin is just like any other plugin. If you've uploaded the plugin package to your server already, skip to step 5 below:
52
+
53
+ 1. In your WordPress admin, go to **Plugins > Add New**
54
+ 2. In the Search field type "pirate forms"
55
+ 3. Under "Pirate Forms," click the **Install Now** link
56
+ 4. Once the process is complete, click the **Activate Plugin** link
57
+ 5. Now, you're able to add contact forms but, first, we could configure a few settings. These can be found at **Settings > Pirate Forms**
58
+ 6. Make the changes desired, then click the **Save changes** button at the bottom
59
+ 7. To add this form to any page or post, just copy/paste or type "[pirate_forms]" into the page or post content and save. The form should appear on that page
60
+
61
+ == Screenshots ==
62
+
63
+ 1. Screenshot 1. How to use in posts/pages
64
+ 2. Screenshot 2. How to customize labels
65
+ 3. Screenshot 3. How to use reCaptcha
66
+ 4. Screenshot 4. Enabling SMTP
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
screenshot-3.png ADDED
Binary file
screenshot-4.png ADDED
Binary file
wpml-config.xml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <wpml-config>
2
+ <admin-texts>
3
+ <key name='pirate_forms_settings_array'>
4
+ <key name='pirateformsopt_label_name' />
5
+ <key name='pirateformsopt_label_email' />
6
+ <key name='pirateformsopt_label_subject' />
7
+ <key name='pirateformsopt_label_message' />
8
+ <key name='pirateformsopt_label_submit_btn' />
9
+ </key>
10
+ </admin-texts>
11
+ </wpml-config>