Contact Form 7 - Version 4.4

Version Description

  • The configuration validator has been introduced.
  • The language selector has been removed from Add New Contact Form screen.
  • Attach a plain text version of the message when sending HTML mail.
  • Added do_not_store additional setting to tell data storage add-ons not to store data through the contact form.
  • The minimum required WordPress version has been changed from 4.2 to 4.3.
Download this release

Release Info

Developer takayukister
Plugin Icon 128x128 Contact Form 7
Version 4.4
Comparing to
See all releases

Code changes from version 4.3.1 to 4.4

Files changed (41) hide show
  1. admin/admin.php +160 -48
  2. admin/css/styles-rtl.css +1 -1
  3. admin/css/styles.css +28 -2
  4. admin/edit-contact-form.php +2 -2
  5. admin/includes/admin-functions.php +35 -4
  6. admin/includes/class-contact-forms-list-table.php +25 -6
  7. admin/includes/editor.php +48 -10
  8. admin/includes/help-tabs.php +0 -11
  9. admin/js/tag-generator.js +4 -0
  10. includes/config-validator.php +325 -0
  11. includes/contact-form-template.php +17 -13
  12. includes/contact-form.php +37 -0
  13. includes/functions.php +5 -0
  14. includes/integration.php +1 -1
  15. includes/l10n.php +22 -68
  16. includes/mail.php +35 -9
  17. languages/contact-form-7-az.mo +0 -0
  18. languages/{contact-form-7-be_BY.mo → contact-form-7-bel.mo} +0 -0
  19. languages/{contact-form-7-eo_EO.mo → contact-form-7-eo.mo} +0 -0
  20. languages/{contact-form-7-ga_IE.mo → contact-form-7-ga.mo} +0 -0
  21. languages/{contact-form-7-gu_IN.mo → contact-form-7-gu.mo} +0 -0
  22. languages/contact-form-7-hr.mo +0 -0
  23. languages/contact-form-7-hu_HU.mo +0 -0
  24. languages/{contact-form-7-hy_AM.mo → contact-form-7-hy.mo} +0 -0
  25. languages/contact-form-7-ja.mo +0 -0
  26. languages/contact-form-7-nl_NL.mo +0 -0
  27. languages/contact-form-7-pt_PT.mo +0 -0
  28. languages/contact-form-7-sv_SE.mo +0 -0
  29. languages/{contact-form-7-ta.mo → contact-form-7-ta_IN.mo} +0 -0
  30. languages/contact-form-7.pot +222 -446
  31. license.txt +1 -1
  32. modules/date.php +3 -3
  33. modules/file.php +5 -5
  34. modules/flamingo.php +2 -1
  35. modules/jetpack.php +0 -27
  36. modules/number.php +3 -3
  37. modules/quiz.php +1 -1
  38. modules/text.php +3 -3
  39. readme.txt +17 -73
  40. settings.php +1 -1
  41. wp-contact-form-7.php +7 -3
admin/admin.php CHANGED
@@ -13,10 +13,15 @@ function wpcf7_admin_init() {
13
add_action( 'admin_menu', 'wpcf7_admin_menu', 9 );
14
15
function wpcf7_admin_menu() {
16
- add_object_page( __( 'Contact Form 7', 'contact-form-7' ),
17
__( 'Contact', 'contact-form-7' ),
18
'wpcf7_read_contact_forms', 'wpcf7',
19
- 'wpcf7_admin_management_page', 'dashicons-email' );
20
21
$edit = add_submenu_page( 'wpcf7',
22
__( 'Edit Contact Form', 'contact-form-7' ),
@@ -149,13 +154,49 @@ function wpcf7_load_contact_form_admin() {
149
exit();
150
}
151
152
$_GET['post'] = isset( $_GET['post'] ) ? $_GET['post'] : '';
153
154
$post = null;
155
156
- if ( 'wpcf7-new' == $plugin_page && isset( $_GET['locale'] ) ) {
157
$post = WPCF7_ContactForm::get_template( array(
158
- 'locale' => $_GET['locale'] ) );
159
} elseif ( ! empty( $_GET['post'] ) ) {
160
$post = WPCF7_ContactForm::get_instance( $_GET['post'] );
161
}
@@ -166,10 +207,6 @@ function wpcf7_load_contact_form_admin() {
166
167
if ( $post && current_user_can( 'wpcf7_edit_contact_form', $post->id() ) ) {
168
$help_tabs->set_help_tabs( 'edit' );
169
-
170
- } else if ( 'wpcf7-new' == $plugin_page ) {
171
- $help_tabs->set_help_tabs( 'add_new' );
172
-
173
} else {
174
$help_tabs->set_help_tabs( 'list' );
175
@@ -229,13 +266,20 @@ function wpcf7_admin_management_page() {
229
return;
230
}
231
232
$list_table = new WPCF7_Contact_Form_List_Table();
233
$list_table->prepare_items();
234
235
?>
236
<div class="wrap">
237
238
- <h2><?php
239
echo esc_html( __( 'Contact Forms', 'contact-form-7' ) );
240
241
if ( current_user_can( 'wpcf7_edit_contact_forms' ) ) {
@@ -247,7 +291,7 @@ function wpcf7_admin_management_page() {
247
. __( 'Search results for &#8220;%s&#8221;', 'contact-form-7' )
248
. '</span>', esc_html( $_REQUEST['s'] ) );
249
}
250
- ?></h2>
251
252
<?php do_action( 'wpcf7_admin_notices' ); ?>
253
@@ -261,48 +305,45 @@ function wpcf7_admin_management_page() {
261
<?php
262
}
263
264
- function wpcf7_admin_add_new_page() {
265
- if ( $post = wpcf7_get_current_contact_form() ) {
266
- $post_id = -1;
267
-
268
- require_once WPCF7_PLUGIN_DIR . '/admin/includes/editor.php';
269
- require_once WPCF7_PLUGIN_DIR . '/admin/edit-contact-form.php';
270
- return;
271
- }
272
-
273
- $available_locales = wpcf7_l10n();
274
- $default_locale = get_locale();
275
276
- if ( ! isset( $available_locales[$default_locale] ) ) {
277
- $default_locale = 'en_US';
278
- }
279
280
?>
281
<div class="wrap">
282
283
- <h2><?php echo esc_html( __( 'Add New Contact Form', 'contact-form-7' ) ); ?></h2>
284
-
285
- <?php do_action( 'wpcf7_admin_notices' ); ?>
286
287
- <h3><?php echo esc_html( sprintf( __( 'Use the default language (%s)', 'contact-form-7' ), $available_locales[$default_locale] ) ); ?></h3>
288
- <p><a href="<?php echo esc_url( add_query_arg( array( 'locale' => $default_locale ), menu_page_url( 'wpcf7-new', false ) ) ); ?>" class="button button-primary" /><?php echo esc_html( __( 'Add New', 'contact-form-7' ) ); ?></a></p>
289
-
290
- <?php unset( $available_locales[$default_locale] ); ?>
291
- <h3><?php echo esc_html( __( 'Or', 'contact-form-7' ) ); ?></h3>
292
- <form action="" method="get">
293
- <input type="hidden" name="page" value="wpcf7-new" />
294
- <select name="locale">
295
- <option value="" selected="selected"><?php echo esc_html( __( '(select language)', 'contact-form-7' ) ); ?></option>
296
- <?php foreach ( $available_locales as $code => $locale ) : ?>
297
- <option value="<?php echo esc_attr( $code ); ?>"><?php echo esc_html( $locale ); ?></option>
298
- <?php endforeach; ?>
299
- </select>
300
- <input type="submit" class="button" value="<?php echo esc_attr( __( 'Add New', 'contact-form-7' ) ); ?>" />
301
</form>
302
</div>
303
<?php
304
}
305
306
function wpcf7_load_integration_page() {
307
$integration = WPCF7_Integration::get_instance();
308
@@ -322,7 +363,7 @@ function wpcf7_admin_integration_page() {
322
?>
323
<div class="wrap">
324
325
- <h2><?php echo esc_html( __( 'Integration with Other Services', 'contact-form-7' ) ); ?></h2>
326
327
<?php do_action( 'wpcf7_admin_notices' ); ?>
328
@@ -351,11 +392,26 @@ function wpcf7_admin_updated_message() {
351
}
352
353
if ( 'created' == $_REQUEST['message'] ) {
354
- $updated_message = __( 'Contact form created.', 'contact-form-7' );
355
} elseif ( 'saved' == $_REQUEST['message'] ) {
356
- $updated_message = __( 'Contact form saved.', 'contact-form-7' );
357
} elseif ( 'deleted' == $_REQUEST['message'] ) {
358
- $updated_message = __( 'Contact form deleted.', 'contact-form-7' );
359
}
360
361
if ( ! empty( $updated_message ) ) {
@@ -419,13 +475,13 @@ function wpcf7_welcome_panel() {
419
<div class="welcome-panel-content">
420
<div class="welcome-panel-column-container">
421
<div class="welcome-panel-column">
422
- <h4><?php echo esc_html( __( 'Contact Form 7 Needs Your Support', 'contact-form-7' ) ); ?></h4>
423
<p class="message"><?php echo esc_html( __( "It is hard to continue development and support for this plugin without contributions from users like you. If you enjoy using Contact Form 7 and find it useful, please consider making a donation.", 'contact-form-7' ) ); ?></p>
424
<p><?php echo wpcf7_link( __( 'http://contactform7.com/donate/', 'contact-form-7' ), __( 'Donate', 'contact-form-7' ), array( 'class' => 'button button-primary' ) ); ?></p>
425
</div>
426
427
<div class="welcome-panel-column">
428
- <h4><?php echo esc_html( __( 'Get Started', 'contact-form-7' ) ); ?></h4>
429
<ul>
430
<li><?php echo wpcf7_link( __( 'http://contactform7.com/getting-started-with-contact-form-7/', 'contact-form-7' ), __( 'Getting Started with Contact Form 7', 'contact-form-7' ) ); ?></li>
431
<li><?php echo wpcf7_link( __( 'http://contactform7.com/admin-screen/', 'contact-form-7' ), __( 'Admin Screen', 'contact-form-7' ) ); ?></li>
@@ -435,7 +491,7 @@ function wpcf7_welcome_panel() {
435
</div>
436
437
<div class="welcome-panel-column">
438
- <h4><?php echo esc_html( __( 'Did You Know?', 'contact-form-7' ) ); ?></h4>
439
<ul>
440
<li><?php echo wpcf7_link( __( 'http://contactform7.com/spam-filtering-with-akismet/', 'contact-form-7' ), __( 'Spam Filtering with Akismet', 'contact-form-7' ) ); ?></li>
441
<li><?php echo wpcf7_link( __( 'http://contactform7.com/save-submitted-messages-with-flamingo/', 'contact-form-7' ), __( 'Save Messages with Flamingo', 'contact-form-7' ) ); ?></li>
@@ -492,3 +548,59 @@ function wpcf7_not_allowed_to_edit() {
492
'<div class="notice notice-warning is-dismissible"><p>%s</p></div>',
493
esc_html( $message ) );
494
}
13
add_action( 'admin_menu', 'wpcf7_admin_menu', 9 );
14
15
function wpcf7_admin_menu() {
16
+ global $_wp_last_object_menu;
17
+
18
+ $_wp_last_object_menu++;
19
+
20
+ add_menu_page( __( 'Contact Form 7', 'contact-form-7' ),
21
__( 'Contact', 'contact-form-7' ),
22
'wpcf7_read_contact_forms', 'wpcf7',
23
+ 'wpcf7_admin_management_page', 'dashicons-email',
24
+ $_wp_last_object_menu );
25
26
$edit = add_submenu_page( 'wpcf7',
27
__( 'Edit Contact Form', 'contact-form-7' ),
154
exit();
155
}
156
157
+ if ( 'validate' == $action && wpcf7_validate_configuration() ) {
158
+ if ( 'POST' == $_SERVER['REQUEST_METHOD'] ) {
159
+ check_admin_referer( 'wpcf7-bulk-validate' );
160
+
161
+ if ( ! current_user_can( 'wpcf7_edit_contact_forms' ) ) {
162
+ wp_die( __( "You are not allowed to validate configuration.", 'contact-form-7' ) );
163
+ }
164
+
165
+ $contact_forms = WPCF7_ContactForm::find();
166
+ $result = array(
167
+ 'timestamp' => current_time( 'timestamp' ),
168
+ 'version' => WPCF7_VERSION,
169
+ 'count_valid' => 0,
170
+ 'count_invalid' => 0 );
171
+
172
+ foreach ( $contact_forms as $contact_form ) {
173
+ $contact_form->validate_configuration();
174
+
175
+ if ( $contact_form->get_config_errors() ) {
176
+ $result['count_invalid'] += 1;
177
+ } else {
178
+ $result['count_valid'] += 1;
179
+ }
180
+ }
181
+
182
+ WPCF7::update_option( 'bulk_validate', $result );
183
+
184
+ $query = array(
185
+ 'message' => 'validated' );
186
+
187
+ $redirect_to = add_query_arg( $query, menu_page_url( 'wpcf7', false ) );
188
+ wp_safe_redirect( $redirect_to );
189
+ exit();
190
+ }
191
+ }
192
+
193
$_GET['post'] = isset( $_GET['post'] ) ? $_GET['post'] : '';
194
195
$post = null;
196
197
+ if ( 'wpcf7-new' == $plugin_page ) {
198
$post = WPCF7_ContactForm::get_template( array(
199
+ 'locale' => isset( $_GET['locale'] ) ? $_GET['locale'] : null ) );
200
} elseif ( ! empty( $_GET['post'] ) ) {
201
$post = WPCF7_ContactForm::get_instance( $_GET['post'] );
202
}
207
208
if ( $post && current_user_can( 'wpcf7_edit_contact_form', $post->id() ) ) {
209
$help_tabs->set_help_tabs( 'edit' );
210
} else {
211
$help_tabs->set_help_tabs( 'list' );
212
266
return;
267
}
268
269
+ if ( 'validate' == wpcf7_current_action()
270
+ && wpcf7_validate_configuration()
271
+ && current_user_can( 'wpcf7_edit_contact_forms' ) ) {
272
+ wpcf7_admin_bulk_validate_page();
273
+ return;
274
+ }
275
+
276
$list_table = new WPCF7_Contact_Form_List_Table();
277
$list_table->prepare_items();
278
279
?>
280
<div class="wrap">
281
282
+ <h1><?php
283
echo esc_html( __( 'Contact Forms', 'contact-form-7' ) );
284
285
if ( current_user_can( 'wpcf7_edit_contact_forms' ) ) {
291
. __( 'Search results for &#8220;%s&#8221;', 'contact-form-7' )
292
. '</span>', esc_html( $_REQUEST['s'] ) );
293
}
294
+ ?></h1>
295
296
<?php do_action( 'wpcf7_admin_notices' ); ?>
297
305
<?php
306
}
307
308
+ function wpcf7_admin_bulk_validate_page() {
309
+ $contact_forms = WPCF7_ContactForm::find();
310
+ $count = WPCF7_ContactForm::count();
311
312
+ $submit_text = sprintf(
313
+ _n(
314
+ "Validate %s Contact Form Now",
315
+ "Validate %s Contact Forms Now",
316
+ $count, 'contact-form-7' ),
317
+ number_format_i18n( $count ) );
318
319
?>
320
<div class="wrap">
321
322
+ <h1><?php echo esc_html( __( 'Validate Configuration', 'contact-form-7' ) ); ?></h1>
323
324
+ <form method="post" action="">
325
+ <input type="hidden" name="action" value="validate" />
326
+ <?php wp_nonce_field( 'wpcf7-bulk-validate' ); ?>
327
+ <p><input type="submit" class="button" value="<?php echo esc_attr( $submit_text ); ?>" /></p>
328
</form>
329
+
330
</div>
331
<?php
332
}
333
334
+ function wpcf7_admin_add_new_page() {
335
+ $post = wpcf7_get_current_contact_form();
336
+
337
+ if ( ! $post ) {
338
+ $post = WPCF7_ContactForm::get_template();
339
+ }
340
+
341
+ $post_id = -1;
342
+
343
+ require_once WPCF7_PLUGIN_DIR . '/admin/includes/editor.php';
344
+ require_once WPCF7_PLUGIN_DIR . '/admin/edit-contact-form.php';
345
+ }
346
+
347
function wpcf7_load_integration_page() {
348
$integration = WPCF7_Integration::get_instance();
349
363
?>
364
<div class="wrap">
365
366
+ <h1><?php echo esc_html( __( 'Integration with Other Services', 'contact-form-7' ) ); ?></h1>
367
368
<?php do_action( 'wpcf7_admin_notices' ); ?>
369
392
}
393
394
if ( 'created' == $_REQUEST['message'] ) {
395
+ $updated_message = __( "Contact form created.", 'contact-form-7' );
396
} elseif ( 'saved' == $_REQUEST['message'] ) {
397
+ $updated_message = __( "Contact form saved.", 'contact-form-7' );
398
} elseif ( 'deleted' == $_REQUEST['message'] ) {
399
+ $updated_message = __( "Contact form deleted.", 'contact-form-7' );
400
+ } elseif ( 'validated' == $_REQUEST['message'] ) {
401
+ $bulk_validate = WPCF7::get_option( 'bulk_validate', array() );
402
+ $count_invalid = isset( $bulk_validate['count_invalid'] )
403
+ ? absint( $bulk_validate['count_invalid'] ) : 0;
404
+
405
+ if ( $count_invalid ) {
406
+ $updated_message = sprintf(
407
+ _n(
408
+ "Configuration validation completed. An invalid contact form was found.",
409
+ "Configuration validation completed. %s invalid contact forms were found.",
410
+ $count_invalid, 'contact-form-7' ),
411
+ number_format_i18n( $count_invalid ) );
412
+ } else {
413
+ $updated_message = __( "Configuration validation completed. No invalid contact form was found.", 'contact-form-7' );
414
+ }
415
}
416
417
if ( ! empty( $updated_message ) ) {
475
<div class="welcome-panel-content">
476
<div class="welcome-panel-column-container">
477
<div class="welcome-panel-column">
478
+ <h3><?php echo esc_html( __( 'Contact Form 7 Needs Your Support', 'contact-form-7' ) ); ?></h3>
479
<p class="message"><?php echo esc_html( __( "It is hard to continue development and support for this plugin without contributions from users like you. If you enjoy using Contact Form 7 and find it useful, please consider making a donation.", 'contact-form-7' ) ); ?></p>
480
<p><?php echo wpcf7_link( __( 'http://contactform7.com/donate/', 'contact-form-7' ), __( 'Donate', 'contact-form-7' ), array( 'class' => 'button button-primary' ) ); ?></p>
481
</div>
482
483
<div class="welcome-panel-column">
484
+ <h3><?php echo esc_html( __( 'Get Started', 'contact-form-7' ) ); ?></h3>
485
<ul>
486
<li><?php echo wpcf7_link( __( 'http://contactform7.com/getting-started-with-contact-form-7/', 'contact-form-7' ), __( 'Getting Started with Contact Form 7', 'contact-form-7' ) ); ?></li>
487
<li><?php echo wpcf7_link( __( 'http://contactform7.com/admin-screen/', 'contact-form-7' ), __( 'Admin Screen', 'contact-form-7' ) ); ?></li>
491
</div>
492
493
<div class="welcome-panel-column">
494
+ <h3><?php echo esc_html( __( 'Did You Know?', 'contact-form-7' ) ); ?></h3>
495
<ul>
496
<li><?php echo wpcf7_link( __( 'http://contactform7.com/spam-filtering-with-akismet/', 'contact-form-7' ), __( 'Spam Filtering with Akismet', 'contact-form-7' ) ); ?></li>
497
<li><?php echo wpcf7_link( __( 'http://contactform7.com/save-submitted-messages-with-flamingo/', 'contact-form-7' ), __( 'Save Messages with Flamingo', 'contact-form-7' ) ); ?></li>
548
'<div class="notice notice-warning is-dismissible"><p>%s</p></div>',
549
esc_html( $message ) );
550
}
551
+
552
+ add_action( 'wpcf7_admin_notices', 'wpcf7_notice_config_errors' );
553
+
554
+ function wpcf7_notice_config_errors() {
555
+ if ( ! $contact_form = wpcf7_get_current_contact_form() ) {
556
+ return;
557
+ }
558
+
559
+ if ( ! wpcf7_validate_configuration()
560
+ || ! current_user_can( 'wpcf7_edit_contact_form', $contact_form->id() ) ) {
561
+ return;
562
+ }
563
+
564
+ if ( $config_errors = $contact_form->get_config_errors() ) {
565
+ $message = sprintf(
566
+ _n(
567
+ "This contact form has a configuration error.",
568
+ "This contact form has %s configuration errors.",
569
+ count( $config_errors ), 'contact-form-7' ),
570
+ number_format_i18n( count( $config_errors ) ) );
571
+
572
+ $link = wpcf7_link(
573
+ __( 'http://contactform7.com/configuration-errors/', 'contact-form-7' ),
574
+ __( 'How to Resolve Configuration Errors', 'contact-form-7' ) );
575
+
576
+ echo sprintf( '<div class="notice notice-error is-dismissible"><p>%s &raquo; %s</p></div>', esc_html( $message ), $link );
577
+ }
578
+ }
579
+
580
+ add_action( 'admin_notices', 'wpcf7_notice_bulk_validate_config' );
581
+
582
+ function wpcf7_notice_bulk_validate_config() {
583
+ if ( ! wpcf7_validate_configuration()
584
+ || ! current_user_can( 'wpcf7_edit_contact_forms' ) ) {
585
+ return;
586
+ }
587
+
588
+ if ( isset( $_GET['page'] ) && 'wpcf7' == $_GET['page']
589
+ && isset( $_GET['action'] ) && 'validate' == $_GET['action'] ) {
590
+ return;
591
+ }
592
+
593
+ if ( WPCF7::get_option( 'bulk_validate' ) ) { // already done.
594
+ return;
595
+ }
596
+
597
+ $link = add_query_arg(
598
+ array( 'action' => 'validate' ),
599
+ menu_page_url( 'wpcf7', false ) );
600
+
601
+ $link = sprintf( '<a href="%s">%s</a>', $link, esc_html( __( 'Validate Contact Form 7 Configuration', 'contact-form-7' ) ) );
602
+
603
+ $message = __( "Misconfiguration leads to mail delivery failure or other troubles. Validate your contact forms now.", 'contact-form-7' );
604
+
605
+ echo sprintf( '<div class="notice notice-warning is-dismissible"><p>%s &raquo; %s</p></div>', esc_html( $message ), $link );
606
+ }
admin/css/styles-rtl.css CHANGED
@@ -25,7 +25,7 @@
25
margin: 8px -8px 8px 8px;
26
}
27
28
- .card h3.title {
29
float: right;
30
}
31
25
margin: 8px -8px 8px 8px;
26
}
27
28
+ .card h2.title {
29
float: right;
30
}
31
admin/css/styles.css CHANGED
@@ -39,6 +39,10 @@ span.shortcode > input {
39
color: #a00;
40
}
41
42
#submitpost input.delete:focus {
43
outline: thin dotted;
44
}
@@ -52,6 +56,12 @@ span.shortcode > input {
52
color: #23282d;
53
}
54
55
/*
56
* Tabs
57
*/
@@ -103,7 +113,7 @@ span.shortcode > input {
103
color: #000;
104
}
105
106
- #contact-form-editor .contact-form-editor-panel h3 {
107
font-size: 18px;
108
font-weight: 400;
109
line-height: 24px;
@@ -253,6 +263,13 @@ span.shortcode > input {
253
color: #666;
254
}
255
256
/*
257
* List Table
258
*/
@@ -267,6 +284,13 @@ span.shortcode > input {
267
/*
268
* Welcome Panel
269
*/
270
.welcome-panel p.message {
271
line-height: 1.4em;
272
margin-right: 25px;
@@ -304,9 +328,11 @@ span.shortcode > input {
304
margin: 8px 8px 8px -8px;
305
}
306
307
- .card h3.title {
308
float: left;
309
max-width: 240px;
310
}
311
312
.card .infobox {
39
color: #a00;
40
}
41
42
+ #submitpost input.delete:hover {
43
+ color: #f00;
44
+ }
45
+
46
#submitpost input.delete:focus {
47
outline: thin dotted;
48
}
56
color: #23282d;
57
}
58
59
+ div.config-error, span.config-error {
60
+ color: #d00;
61
+ font-style: normal;
62
+ font-size: 13px;
63
+ }
64
+
65
/*
66
* Tabs
67
*/
113
color: #000;
114
}
115
116
+ #contact-form-editor .contact-form-editor-panel h2 {
117
font-size: 18px;
118
font-weight: 400;
119
line-height: 24px;
263
color: #666;
264
}
265
266
+ /*
267
+ * Messages Panel
268
+ */
269
+ #messages-panel p.description {
270
+ margin: 5px 0 10px;
271
+ }
272
+
273
/*
274
* List Table
275
*/
284
/*
285
* Welcome Panel
286
*/
287
+ .welcome-panel h3 {
288
+ font-size: 16px;
289
+ font-weight: 600;
290
+ line-height: 2.1em;
291
+ margin: 1.33em 0 0;
292
+ }
293
+
294
.welcome-panel p.message {
295
line-height: 1.4em;
296
margin-right: 25px;
328
margin: 8px 8px 8px -8px;
329
}
330
331
+ .card h2.title {
332
float: left;
333
max-width: 240px;
334
+ font-size: 1.3em;
335
+ font-weight: 600;
336
}
337
338
.card .infobox {
admin/edit-contact-form.php CHANGED
@@ -31,7 +31,7 @@ function wpcf7_admin_save_button( $post_id ) {
31
32
?><div class="wrap">
33
34
- <h2><?php
35
if ( $post->initial() ) {
36
echo esc_html( __( 'Add New Contact Form', 'contact-form-7' ) );
37
} else {
@@ -41,7 +41,7 @@ function wpcf7_admin_save_button( $post_id ) {
41
echo ' <a href="' . esc_url( menu_page_url( 'wpcf7-new', false ) ) . '" class="add-new-h2">' . esc_html( __( 'Add New', 'contact-form-7' ) ) . '</a>';
42
}
43
}
44
- ?></h2>
45
46
<?php do_action( 'wpcf7_admin_notices' ); ?>
47
31
32
?><div class="wrap">
33
34
+ <h1><?php
35
if ( $post->initial() ) {
36
echo esc_html( __( 'Add New Contact Form', 'contact-form-7' ) );
37
} else {
41
echo ' <a href="' . esc_url( menu_page_url( 'wpcf7-new', false ) ) . '" class="add-new-h2">' . esc_html( __( 'Add New', 'contact-form-7' ) ) . '</a>';
42
}
43
}
44
+ ?></h1>
45
46
<?php do_action( 'wpcf7_admin_notices' ); ?>
47
admin/includes/admin-functions.php CHANGED
@@ -67,7 +67,20 @@ function wpcf7_save_contact_form( $post_id = -1 ) {
67
}
68
69
if ( isset( $_POST['wpcf7-mail-additional-headers'] ) ) {
70
- $mail['additional_headers'] = trim( $_POST['wpcf7-mail-additional-headers'] );
71
}
72
73
if ( isset( $_POST['wpcf7-mail-attachments'] ) ) {
@@ -100,8 +113,20 @@ function wpcf7_save_contact_form( $post_id = -1 ) {
100
}
101
102
if ( isset( $_POST['wpcf7-mail-2-additional-headers'] ) ) {
103
- $mail_2['additional_headers'] = trim(
104
- $_POST['wpcf7-mail-2-additional-headers'] );
105
}
106
107
if ( isset( $_POST['wpcf7-mail-2-attachments'] ) ) {
@@ -130,5 +155,11 @@ function wpcf7_save_contact_form( $post_id = -1 ) {
130
131
do_action( 'wpcf7_save_contact_form', $contact_form );
132
133
- return $contact_form->save();
134
}
67
}
68
69
if ( isset( $_POST['wpcf7-mail-additional-headers'] ) ) {
70
+ $headers = '';
71
+ $tempheaders = str_replace(
72
+ "\r\n", "\n", $_POST['wpcf7-mail-additional-headers'] );
73
+ $tempheaders = explode( "\n", $tempheaders );
74
+
75
+ foreach ( $tempheaders as $header ) {
76
+ $header = trim( $header );
77
+
78
+ if ( '' !== $header ) {
79
+ $headers .= $header . "\n";
80
+ }
81
+ }
82
+
83
+ $mail['additional_headers'] = trim( $headers );
84
}
85
86
if ( isset( $_POST['wpcf7-mail-attachments'] ) ) {
113
}
114
115
if ( isset( $_POST['wpcf7-mail-2-additional-headers'] ) ) {
116
+ $headers = '';
117
+ $tempheaders = str_replace(
118
+ "\r\n", "\n", $_POST['wpcf7-mail-2-additional-headers'] );
119
+ $tempheaders = explode( "\n", $tempheaders );
120
+
121
+ foreach ( $tempheaders as $header ) {
122
+ $header = trim( $header );
123
+
124
+ if ( '' !== $header ) {
125
+ $headers .= $header . "\n";
126
+ }
127
+ }
128
+
129
+ $mail_2['additional_headers'] = trim( $headers );
130
}
131
132
if ( isset( $_POST['wpcf7-mail-2-attachments'] ) ) {
155
156
do_action( 'wpcf7_save_contact_form', $contact_form );
157
158
+ $post_id = $contact_form->save();
159
+
160
+ if ( wpcf7_validate_configuration() ) {
161
+ $contact_form->validate_configuration();
162
+ }
163
+
164
+ return $post_id;
165
}
admin/includes/class-contact-forms-list-table.php CHANGED
@@ -100,6 +100,29 @@ class WPCF7_Contact_Form_List_Table extends WP_List_Table {
100
$url = admin_url( 'admin.php?page=wpcf7&post=' . absint( $item->id() ) );
101
$edit_link = add_query_arg( array( 'action' => 'edit' ), $url );
102
103
$actions = array(
104
'edit' => sprintf( '<a href="%1$s">%2$s</a>',
105
esc_url( $edit_link ),
@@ -116,13 +139,9 @@ class WPCF7_Contact_Form_List_Table extends WP_List_Table {
116
esc_html( __( 'Duplicate', 'contact-form-7' ) ) ) ) );
117
}
118
119
- $a = sprintf( '<a class="row-title" href="%1$s" title="%2$s">%3$s</a>',
120
- esc_url( $edit_link ),
121
- esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;', 'contact-form-7' ),
122
- $item->title() ) ),
123
- esc_html( $item->title() ) );
124
125
- return '<strong>' . $a . '</strong> ' . $this->row_actions( $actions );
126
}
127
128
function column_author( $item ) {
100
$url = admin_url( 'admin.php?page=wpcf7&post=' . absint( $item->id() ) );
101
$edit_link = add_query_arg( array( 'action' => 'edit' ), $url );
102
103
+ $output = sprintf(
104
+ '<a class="row-title" href="%1$s" title="%2$s">%3$s</a>',
105
+ esc_url( $edit_link ),
106
+ esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;', 'contact-form-7' ),
107
+ $item->title() ) ),
108
+ esc_html( $item->title() ) );
109
+
110
+ $output = sprintf( '<strong>%s</strong>', $output );
111
+
112
+ if ( wpcf7_validate_configuration()
113
+ && current_user_can( 'wpcf7_edit_contact_form', $item->id() )
114
+ && $config_errors = $item->get_config_errors() ) {
115
+ $error_notice = sprintf(
116
+ _n(
117
+ '%s configuration error found',
118
+ '%s configuration errors found',
119
+ count( $config_errors ), 'contact-form-7' ),
120
+ number_format_i18n( count( $config_errors ) ) );
121
+ $output .= sprintf(
122
+ '<div class="config-error">%s</div>',
123
+ $error_notice );
124
+ }
125
+
126
$actions = array(
127
'edit' => sprintf( '<a href="%1$s">%2$s</a>',
128
esc_url( $edit_link ),
139
esc_html( __( 'Duplicate', 'contact-form-7' ) ) ) ) );
140
}
141
142
+ $output .= $this->row_actions( $actions );
143
144
+ return $output;
145
}
146
147
function column_author( $item ) {
admin/includes/editor.php CHANGED
@@ -42,7 +42,7 @@ class WPCF7_Editor {
42
43
function wpcf7_editor_panel_form( $post ) {
44
?>
45
- <h3><?php echo esc_html( __( 'Form', 'contact-form-7' ) ); ?></h3>
46
47
<?php
48
$tag_generator = WPCF7_TagGenerator::get_instance();
@@ -79,9 +79,11 @@ function wpcf7_editor_box_mail( $post, $args = '' ) {
79
'subject' => '', 'body' => '', 'additional_headers' => '',
80
'attachments' => '', 'use_html' => false, 'exclude_blank' => false ) );
81
82
?>
83
<div class="contact-form-editor-box-mail" id="<?php echo $id; ?>">
84
- <h3><?php echo esc_html( $args['title'] ); ?></h3>
85
86
<?php
87
if ( ! empty( $args['use'] ) ) :
@@ -102,7 +104,12 @@ function wpcf7_editor_box_mail( $post, $args = '' ) {
102
<label for="<?php echo $id; ?>-recipient"><?php echo esc_html( __( 'To', 'contact-form-7' ) ); ?></label>
103
</th>
104
<td>
105
- <input type="text" id="<?php echo $id; ?>-recipient" name="<?php echo $id; ?>-recipient" class="large-text code" size="70" value="<?php echo esc_attr( $mail['recipient'] ); ?>" />
106
</td>
107
</tr>
108
@@ -111,7 +118,12 @@ function wpcf7_editor_box_mail( $post, $args = '' ) {
111
<label for="<?php echo $id; ?>-sender"><?php echo esc_html( __( 'From', 'contact-form-7' ) ); ?></label>
112
</th>
113
<td>
114
- <input type="text" id="<?php echo $id; ?>-sender" name="<?php echo $id; ?>-sender" class="large-text code" size="70" value="<?php echo esc_attr( $mail['sender'] ); ?>" />
115
</td>
116
</tr>
117
@@ -120,7 +132,12 @@ function wpcf7_editor_box_mail( $post, $args = '' ) {
120
<label for="<?php echo $id; ?>-subject"><?php echo esc_html( __( 'Subject', 'contact-form-7' ) ); ?></label>
121
</th>
122
<td>
123
- <input type="text" id="<?php echo $id; ?>-subject" name="<?php echo $id; ?>-subject" class="large-text code" size="70" value="<?php echo esc_attr( $mail['subject'] ); ?>" />
124
</td>
125
</tr>
126
@@ -129,7 +146,12 @@ function wpcf7_editor_box_mail( $post, $args = '' ) {
129
<label for="<?php echo $id; ?>-additional-headers"><?php echo esc_html( __( 'Additional Headers', 'contact-form-7' ) ); ?></label>
130
</th>
131
<td>
132
- <textarea id="<?php echo $id; ?>-additional-headers" name="<?php echo $id; ?>-additional-headers" cols="100" rows="4" class="large-text code"><?php echo esc_textarea( $mail['additional_headers'] ); ?></textarea>
133
</td>
134
</tr>
135
@@ -138,7 +160,12 @@ function wpcf7_editor_box_mail( $post, $args = '' ) {
138
<label for="<?php echo $id; ?>-body"><?php echo esc_html( __( 'Message Body', 'contact-form-7' ) ); ?></label>
139
</th>
140
<td>
141
- <textarea id="<?php echo $id; ?>-body" name="<?php echo $id; ?>-body" cols="100" rows="18" class="large-text code"><?php echo esc_textarea( $mail['body'] ); ?></textarea>
142
143
<p><label for="<?php echo $id; ?>-exclude-blank"><input type="checkbox" id="<?php echo $id; ?>-exclude-blank" name="<?php echo $id; ?>-exclude-blank" value="1"<?php echo ( ! empty( $mail['exclude_blank'] ) ) ? ' checked="checked"' : ''; ?> /> <?php echo esc_html( __( 'Exclude lines with blank mail-tags from output', 'contact-form-7' ) ); ?></label></p>
144
@@ -168,18 +195,29 @@ function wpcf7_editor_panel_messages( $post ) {
168
unset( $messages['captcha_not_match'] );
169
}
170
171
?>
172
- <h3><?php echo esc_html( __( 'Messages', 'contact-form-7' ) ); ?></h3>
173
<fieldset>
174
<legend><?php echo esc_html( __( 'Edit messages used in the following situations.', 'contact-form-7' ) ); ?></legend>
175
<?php
176
177
foreach ( $messages as $key => $arr ) {
178
$field_name = 'wpcf7-message-' . strtr( $key, '_', '-' );
179
?>
180
<p class="description">
181
<label for="<?php echo $field_name; ?>"><?php echo esc_html( $arr['description'] ); ?><br />
182
- <input type="text" id="<?php echo $field_name; ?>" name="<?php echo $field_name; ?>" class="large-text" size="70" value="<?php echo esc_attr( $post->message( $key, false ) ); ?>" />
183
</label>
184
</p>
185
<?php
@@ -197,7 +235,7 @@ function wpcf7_editor_panel_additional_settings( $post ) {
197
$description = sprintf( esc_html( $description ), $desc_link );
198
199
?>
200
- <h3><?php echo esc_html( __( 'Additional Settings', 'contact-form-7' ) ); ?></h3>
201
<fieldset>
202
<legend><?php echo $description; ?></legend>
203
<textarea id="wpcf7-additional-settings" name="wpcf7-additional-settings" cols="100" rows="8" class="large-text"><?php echo esc_textarea( $post->prop( 'additional_settings' ) ); ?></textarea>
42
43
function wpcf7_editor_panel_form( $post ) {
44
?>
45
+ <h2><?php echo esc_html( __( 'Form', 'contact-form-7' ) ); ?></h2>
46
47
<?php
48
$tag_generator = WPCF7_TagGenerator::get_instance();
79
'subject' => '', 'body' => '', 'additional_headers' => '',
80
'attachments' => '', 'use_html' => false, 'exclude_blank' => false ) );
81
82
+ $do_validate = wpcf7_validate_configuration();
83
+
84
?>
85
<div class="contact-form-editor-box-mail" id="<?php echo $id; ?>">
86
+ <h2><?php echo esc_html( $args['title'] ); ?></h2>
87
88
<?php
89
if ( ! empty( $args['use'] ) ) :
104
<label for="<?php echo $id; ?>-recipient"><?php echo esc_html( __( 'To', 'contact-form-7' ) ); ?></label>
105
</th>
106
<td>
107
+ <?php $config_error = $post->config_error(
108
+ sprintf( '%s.recipient', $args['name'] ) ); ?>
109
+ <input type="text" id="<?php echo $id; ?>-recipient" name="<?php echo $id; ?>-recipient" class="large-text code" size="70" value="<?php echo esc_attr( $mail['recipient'] ); ?>"<?php if ( $do_validate && $config_error ) { echo ' aria-invalid="true"'; } ?> />
110
+ <?php if ( $do_validate && $config_error ) {
111
+ echo sprintf( '<br /><span role="alert" class="config-error">%s</span>', $config_error );
112
+ } ?>
113
</td>
114
</tr>
115
118
<label for="<?php echo $id; ?>-sender"><?php echo esc_html( __( 'From', 'contact-form-7' ) ); ?></label>
119
</th>
120
<td>
121
+ <?php $config_error = $post->config_error(
122
+ sprintf( '%s.sender', $args['name'] ) ); ?>
123
+ <input type="text" id="<?php echo $id; ?>-sender" name="<?php echo $id; ?>-sender" class="large-text code" size="70" value="<?php echo esc_attr( $mail['sender'] ); ?>"<?php if ( $do_validate && $config_error ) { echo ' aria-invalid="true"'; } ?> />
124
+ <?php if ( $do_validate && $config_error ) {
125
+ echo sprintf( '<br /><span role="alert" class="config-error">%s</span>', $config_error );
126
+ } ?>
127
</td>
128
</tr>
129
132
<label for="<?php echo $id; ?>-subject"><?php echo esc_html( __( 'Subject', 'contact-form-7' ) ); ?></label>
133
</th>
134
<td>
135
+ <?php $config_error = $post->config_error(
136
+ sprintf( '%s.subject', $args['name'] ) ); ?>
137
+ <input type="text" id="<?php echo $id; ?>-subject" name="<?php echo $id; ?>-subject" class="large-text code" size="70" value="<?php echo esc_attr( $mail['subject'] ); ?>"<?php if ( $do_validate && $config_error ) { echo ' aria-invalid="true"'; } ?> />
138
+ <?php if ( $do_validate && $config_error ) {
139
+ echo sprintf( '<br /><span role="alert" class="config-error">%s</span>', $config_error );
140
+ } ?>
141
</td>
142
</tr>
143
146
<label for="<?php echo $id; ?>-additional-headers"><?php echo esc_html( __( 'Additional Headers', 'contact-form-7' ) ); ?></label>
147
</th>
148
<td>
149
+ <?php $config_error = $post->config_error(
150
+ sprintf( '%s.additional_headers', $args['name'] ) ); ?>
151
+ <textarea id="<?php echo $id; ?>-additional-headers" name="<?php echo $id; ?>-additional-headers" cols="100" rows="4" class="large-text code"<?php if ( $do_validate && $config_error ) { echo ' aria-invalid="true"'; } ?>><?php echo esc_textarea( $mail['additional_headers'] ); ?></textarea>
152
+ <?php if ( $do_validate && $config_error ) {
153
+ echo sprintf( '<br /><span role="alert" class="config-error">%s</span>', $config_error );
154
+ } ?>
155
</td>
156
</tr>
157
160
<label for="<?php echo $id; ?>-body"><?php echo esc_html( __( 'Message Body', 'contact-form-7' ) ); ?></label>
161
</th>
162
<td>
163
+ <?php $config_error = $post->config_error(
164
+ sprintf( '%s.body', $args['name'] ) ); ?>
165
+ <textarea id="<?php echo $id; ?>-body" name="<?php echo $id; ?>-body" cols="100" rows="18" class="large-text code"<?php if ( $do_validate && $config_error ) { echo ' aria-invalid="true"'; } ?>><?php echo esc_textarea( $mail['body'] ); ?></textarea>
166
+ <?php if ( $do_validate && $config_error ) {
167
+ echo sprintf( '<br /><span role="alert" class="config-error">%s</span>', $config_error );
168
+ } ?>
169
170
<p><label for="<?php echo $id; ?>-exclude-blank"><input type="checkbox" id="<?php echo $id; ?>-exclude-blank" name="<?php echo $id; ?>-exclude-blank" value="1"<?php echo ( ! empty( $mail['exclude_blank'] ) ) ? ' checked="checked"' : ''; ?> /> <?php echo esc_html( __( 'Exclude lines with blank mail-tags from output', 'contact-form-7' ) ); ?></label></p>
171
195
unset( $messages['captcha_not_match'] );
196
}
197
198
+ $do_validate = wpcf7_validate_configuration();
199
+
200
?>
201
+ <h2><?php echo esc_html( __( 'Messages', 'contact-form-7' ) ); ?></h2>
202
<fieldset>
203
<legend><?php echo esc_html( __( 'Edit messages used in the following situations.', 'contact-form-7' ) ); ?></legend>
204
<?php
205
206
foreach ( $messages as $key => $arr ) {
207
$field_name = 'wpcf7-message-' . strtr( $key, '_', '-' );
208
+
209
+ $config_error = $do_validate
210
+ ? $post->config_error( sprintf( 'messages.%s', $key ) ) : '';
211
+
212
?>
213
<p class="description">
214
<label for="<?php echo $field_name; ?>"><?php echo esc_html( $arr['description'] ); ?><br />
215
+ <input type="text" id="<?php echo $field_name; ?>" name="<?php echo $field_name; ?>" class="large-text" size="70" value="<?php echo esc_attr( $post->message( $key, false ) ); ?>"<?php echo $config_error ? ' aria-invalid="true"' : ''; ?> />
216
+ <?php
217
+ if ( $config_error ) {
218
+ echo sprintf( '<br /><span role="alert" class="config-error">%s</span>', $config_error );
219
+ }
220
+ ?>
221
</label>
222
</p>
223
<?php
235
$description = sprintf( esc_html( $description ), $desc_link );
236
237
?>
238
+ <h2><?php echo esc_html( __( 'Additional Settings', 'contact-form-7' ) ); ?></h2>
239
<fieldset>
240
<legend><?php echo $description; ?></legend>
241
<textarea id="wpcf7-additional-settings" name="wpcf7-additional-settings" cols="100" rows="8" class="large-text"><?php echo esc_textarea( $post->prop( 'additional_settings' ) ); ?></textarea>
admin/includes/help-tabs.php CHANGED
@@ -23,15 +23,6 @@ class WPCF7_Help_Tabs {
23
24
$this->sidebar();
25
26
- return;
27
- case 'add_new':
28
- $this->screen->add_help_tab( array(
29
- 'id' => 'add_new',
30
- 'title' => __( 'Adding A New Contact Form', 'contact-form-7' ),
31
- 'content' => $this->content( 'add_new' ) ) );
32
-
33
- $this->sidebar();
34
-
35
return;
36
case 'edit':
37
$this->screen->add_help_tab( array(
@@ -73,8 +64,6 @@ class WPCF7_Help_Tabs {
73
$content['list_available_actions'] .= '<p>' . __( "<strong>Edit</strong> - Navigates to the editing screen for that contact form. You can also reach that screen by clicking on the contact form title.", 'contact-form-7' ) . '</p>';
74
$content['list_available_actions'] .= '<p>' . __( "<strong>Duplicate</strong> - Clones that contact form. A cloned contact form inherits all content from the original, but has a different ID.", 'contact-form-7' ) . '</p>';
75
76
- $content['add_new'] = '<p>' . __( "You can add a new contact form on this screen. You can create a contact form in your language, which is set WordPress local settings, or in a language that you select from available options.", 'contact-form-7' ) . '</p>';
77
-
78
$content['edit_overview'] = '<p>' . __( "On this screen, you can edit a contact form. A contact form is comprised of the following components:", 'contact-form-7' ) . '</p>';
79
$content['edit_overview'] .= '<p>' . __( "<strong>Title</strong> is the title of a contact form. This title is only used for labeling a contact form, and can be edited.", 'contact-form-7' ) . '</p>';
80
$content['edit_overview'] .= '<p>' . __( "<strong>Form</strong> is a content of HTML form. You can use arbitrary HTML, which is allowed inside a form element. You can also use Contact Form 7&#8217;s form-tags here.", 'contact-form-7' ) . '</p>';
23
24
$this->sidebar();
25
26
return;
27
case 'edit':
28
$this->screen->add_help_tab( array(
64
$content['list_available_actions'] .= '<p>' . __( "<strong>Edit</strong> - Navigates to the editing screen for that contact form. You can also reach that screen by clicking on the contact form title.", 'contact-form-7' ) . '</p>';
65
$content['list_available_actions'] .= '<p>' . __( "<strong>Duplicate</strong> - Clones that contact form. A cloned contact form inherits all content from the original, but has a different ID.", 'contact-form-7' ) . '</p>';
66
67
$content['edit_overview'] = '<p>' . __( "On this screen, you can edit a contact form. A contact form is comprised of the following components:", 'contact-form-7' ) . '</p>';
68
$content['edit_overview'] .= '<p>' . __( "<strong>Title</strong> is the title of a contact form. This title is only used for labeling a contact form, and can be edited.", 'contact-form-7' ) . '</p>';
69
$content['edit_overview'] .= '<p>' . __( "<strong>Form</strong> is a content of HTML form. You can use arbitrary HTML, which is allowed inside a form element. You can also use Contact Form 7&#8217;s form-tags here.", 'contact-form-7' ) . '</p>';
admin/js/tag-generator.js CHANGED
@@ -122,6 +122,10 @@
122
}
123
});
124
125
options = (options.length > 0) ? options.join(' ') : '';
126
127
var value = '';
122
}
123
});
124
125
+ if ('radio' == tagType) {
126
+ options.push('default:1');
127
+ }
128
+
129
options = (options.length > 0) ? options.join(' ') : '';
130
131
var value = '';
includes/config-validator.php ADDED
@@ -0,0 +1,325 @@
1
+ <?php
2
+
3
+ class WPCF7_ConfigValidator {
4
+
5
+ const error_maybe_empty = 101;
6
+ const error_invalid_syntax = 102;
7
+ const error_email_not_in_site_domain = 103;
8
+ const error_html_in_message = 104;
9
+
10
+ private $contact_form;
11
+ private $errors = array();
12
+
13
+ public function __construct( WPCF7_ContactForm $contact_form ) {
14
+ $this->contact_form = $contact_form;
15
+ $this->errors = (array) get_post_meta(
16
+ $this->contact_form->id(), '_config_errors', true );
17
+ $this->errors = array_filter( $this->errors );
18
+ }
19
+
20
+ public function is_valid() {
21
+ return ! $this->errors;
22
+ }
23
+
24
+ public function get_errors() {
25
+ return $this->errors;
26
+ }
27
+
28
+ public function get_error( $section ) {
29
+ if ( isset( $this->errors[$section] ) ) {
30
+ return $this->errors[$section];
31
+ }
32
+
33
+ return null;
34
+ }
35
+
36
+ public function get_error_message( $section ) {
37
+ $code = $this->get_error( $section );
38
+
39
+ switch ( $code ) {
40
+ case self::error_maybe_empty:
41
+ return __( "This field can be empty depending on user input.", 'contact-form-7' );
42
+ case self::error_invalid_syntax:
43
+ return __( "This field has syntax errors.", 'contact-form-7' );
44
+ case self::error_email_not_in_site_domain:
45
+ return __( "This email address does not belong to the same domain as the site.", 'contact-form-7' );
46
+ case self::error_html_in_message:
47
+ return __( "HTML tags are not allowed in a message.", 'contact-form-7' );
48
+ default:
49
+ return '';
50
+ }
51
+ }
52
+
53
+ private function add_error( $section, $error ) {
54
+ $this->errors[$section] = $error;
55
+ }
56
+
57
+ public function validate() {
58
+ $this->errors = array();
59
+
60
+ $this->validate_mail( 'mail' );
61
+ $this->validate_mail( 'mail_2' );
62
+ $this->validate_messages();
63
+
64
+ delete_post_meta( $this->contact_form->id(), '_config_errors' );
65
+
66
+ if ( $this->errors ) {
67
+ update_post_meta( $this->contact_form->id(), '_config_errors',
68
+ $this->errors );
69
+ return false;
70
+ }
71
+
72
+ return true;
73
+ }
74
+
75
+ public function validate_mail( $template = 'mail' ) {
76
+ $components = (array) $this->contact_form->prop( $template );
77
+
78
+ if ( ! $components ) {
79
+ return;
80
+ }
81
+
82
+ if ( 'mail' != $template && empty( $components['active'] ) ) {
83
+ return;
84
+ }
85
+
86
+ $components = wp_parse_args( $components, array(
87
+ 'subject' => '',
88
+ 'sender' => '',
89
+ 'recipient' => '',
90
+ 'additional_headers' => '',
91
+ 'body' => '' ) );
92
+
93
+ $callback = array( $this, 'replace_mail_tags_with_minimum_input' );
94
+
95
+ $subject = $components['subject'];
96
+ $subject = new WPCF7_MailTaggedText( $subject,
97
+ array( 'callback' => $callback ) );
98
+ $subject = $subject->replace_tags();
99
+ $subject = wpcf7_strip_newline( $subject );
100
+
101
+ if ( '' === $subject ) {
102
+ $this->add_error( sprintf( '%s.subject', $template ),
103
+ self::error_maybe_empty );
104
+ }
105
+
106
+ $sender = $components['sender'];
107
+ $sender = new WPCF7_MailTaggedText( $sender,
108
+ array( 'callback' => $callback ) );
109
+ $sender = $sender->replace_tags();
110
+ $sender = wpcf7_strip_newline( $sender );
111
+
112
+ if ( ! $this->test_from_field_syntax( $sender ) ) {
113
+ $this->add_error( sprintf( '%s.sender', $template ),
114
+ self::error_invalid_syntax );
115
+ } elseif ( ! $this->test_email_in_site_domain( $sender ) ) {
116
+ $this->add_error( sprintf( '%s.sender', $template ),
117
+ self::error_email_not_in_site_domain );
118
+ }
119
+
120
+ $recipient = $components['recipient'];
121
+ $recipient = new WPCF7_MailTaggedText( $recipient,
122
+ array( 'callback' => $callback ) );
123
+ $recipient = $recipient->replace_tags();
124
+ $recipient = wpcf7_strip_newline( $recipient );
125
+
126
+ if ( ! $this->test_to_field_syntax( $recipient ) ) {
127
+ $this->add_error( sprintf( '%s.recipient', $template ),
128
+ self::error_invalid_syntax );
129
+ }
130
+
131
+ $additional_headers = $components['additional_headers'];
132
+ $additional_headers = new WPCF7_MailTaggedText( $additional_headers,
133
+ array( 'callback' => $callback ) );
134
+ $additional_headers = $additional_headers->replace_tags();
135
+
136
+ if ( ! $this->test_additional_headers_syntax( $additional_headers ) ) {
137
+ $this->add_error( sprintf( '%s.additional_headers', $template ),
138
+ self::error_invalid_syntax );
139
+ }
140
+
141
+ $body = $components['body'];
142
+ $body = new WPCF7_MailTaggedText( $body,
143
+ array( 'callback' => $callback ) );
144
+ $body = $body->replace_tags();
145
+
146
+ if ( '' === $body ) {
147
+ $this->add_error( sprintf( '%s.body', $template ),
148
+ self::error_maybe_empty );
149
+ }
150
+ }
151
+
152
+ public function test_from_field_syntax( $content ) {
153
+ $content = trim( $content );
154
+
155
+ if ( preg_match( '/<(.+)>#x2F;', $content, $matches ) ) {
156
+ $email = $matches[1];
157
+ } else {
158
+ $email = $content;
159
+ }
160
+
161
+ return wpcf7_is_email( $email );
162
+ }
163
+
164
+ public function test_email_in_site_domain( $content ) {
165
+ if ( wpcf7_is_localhost() ) {
166
+ return true;
167
+ }
168
+
169
+ $site_domain = strtolower( $_SERVER['SERVER_NAME'] );
170
+
171
+ if ( substr( $site_domain, 0, 4 ) == 'www.' ) {
172
+ $site_domain = substr( $site_domain, 4 );
173
+ }
174
+
175
+ $content = trim( $content );
176
+
177
+ if ( preg_match( '/<(.+)>#x2F;', $content, $matches ) ) {
178
+ $email = strtolower( $matches[1] );
179
+ } else {
180
+ $email = strtolower( $content );
181
+ }
182
+
183
+ return ( substr( $email, - strlen( $site_domain ) ) == $site_domain );
184
+ }
185
+
186
+ public function test_to_field_syntax( $content ) {
187
+ $tos = explode( ',', $content );
188
+
189
+ foreach ( $tos as $to ) {
190
+ $to = trim( $to );
191
+
192
+ if ( preg_match( '/<(.+)>#x2F;', $to, $matches ) ) {
193
+ $to = $matches[1];
194
+ }
195
+
196
+ if ( ! wpcf7_is_email( $to ) ) {
197
+ return false;
198
+ }
199
+ }
200
+
201
+ return true;
202
+ }
203
+
204
+ public function test_additional_headers_syntax( $content ) {
205
+ $headers = explode( "\n", $content );
206
+
207
+ foreach ( $headers as $header ) {
208
+ $header = trim( $header );
209
+
210
+ if ( '' === $header ) {
211
+ continue;
212
+ }
213
+
214
+ if ( ! preg_match( '/^[0-9A-Za-z-]+:.+#x2F;', $header ) ) {
215
+ return false;
216
+ }
217
+ }
218
+
219
+ return true;
220
+ }
221
+
222
+ public function validate_messages() {
223
+ $messages = (array) $this->contact_form->prop( 'messages' );
224
+
225
+ if ( ! $messages ) {
226
+ return;
227
+ }
228
+
229
+ foreach ( $messages as $key => $message ) {
230
+ $stripped = wp_strip_all_tags( $message );
231
+
232
+ if ( $stripped != $message ) {
233
+ $this->add_error( sprintf( 'messages.%s', $key ),
234
+ self::error_html_in_message );
235
+ }
236
+ }
237
+ }
238
+
239
+ public function replace_mail_tags_with_minimum_input( $matches ) {
240
+ // allow [[foo]] syntax for escaping a tag
241
+ if ( $matches[1] == '[' && $matches[4] == ']' ) {
242
+ return substr( $matches[0], 1, -1 );
243
+ }
244
+
245
+ $tag = $matches[0];
246
+ $tagname = $matches[2];
247
+ $values = $matches[3];
248
+
249
+ if ( ! empty( $values ) ) {
250
+ preg_match_all( '/"[^"]*"|\'[^\']*\'/', $values, $matches );
251
+ $values = wpcf7_strip_quote_deep( $matches[0] );
252
+ }
253
+
254
+ $do_not_heat = false;
255
+
256
+ if ( preg_match( '/^_raw_(.+)#x2F;', $tagname, $matches ) ) {
257
+ $tagname = trim( $matches[1] );
258
+ $do_not_heat = true;
259
+ }
260
+
261
+ $format = '';
262
+
263
+ if ( preg_match( '/^_format_(.+)#x2F;', $tagname, $matches ) ) {
264
+ $tagname = trim( $matches[1] );
265
+ $format = $values[0];
266
+ }
267
+
268
+ $example_email = 'example@example.com';
269
+ $example_text = 'example';
270
+ $example_blank = '';
271
+
272
+ $form_tags = $this->contact_form->form_scan_shortcode(
273
+ array( 'name' => $tagname ) );
274
+
275
+ if ( $form_tags ) {
276
+ $form_tag = new WPCF7_Shortcode( $form_tags[0] );
277
+
278
+ $is_required = ( $form_tag->is_required() || 'radio' == $form_tag->type );
279
+
280
+ if ( ! $is_required ) {
281
+ return $example_blank;
282
+ }
283
+
284
+ $is_selectable = in_array( $form_tag->basetype,
285
+ array( 'radio', 'checkbox', 'select' ) );
286
+
287
+ if ( $is_selectable ) {
288
+ if ( $form_tag->pipes instanceof WPCF7_Pipes ) {
289
+ if ( $do_not_heat ) {
290
+ $before_pipes = $form_tag->pipes->collect_befores();
291
+ $last_item = array_pop( $before_pipes );
292
+ } else {
293
+ $after_pipes = $form_tag->pipes->collect_afters();
294
+ $last_item = array_pop( $after_pipes );
295
+ }
296
+ } else {
297
+ $last_item = array_pop( $form_tag->values );
298
+ }
299
+
300
+ if ( $last_item && wpcf7_is_email( $last_item ) ) {
301
+ return $example_email;
302
+ } else {
303
+ return $example_text;
304
+ }
305
+ }
306
+
307
+ if ( 'email' == $form_tag->basetype ) {
308
+ return $example_email;
309
+ } else {
310
+ return $example_text;
311
+ }
312
+
313
+ } else {
314
+ $tagname = preg_replace( '/^wpcf7\./', '_', $tagname ); // for back-compat
315
+
316
+ if ( '_post_author_email' == $tagname ) {
317
+ return $example_email;
318
+ } elseif ( '_' == substr( $tagname, 0, 1 ) ) { // maybe special mail tag
319
+ return $example_text;
320
+ }
321
+ }
322
+
323
+ return $tag;
324
+ }
325
+ }
includes/contact-form-template.php CHANGED
@@ -37,7 +37,9 @@ class WPCF7_ContactFormTemplate {
37
38
public static function mail() {
39
$template = array(
40
- 'subject' => '[your-subject]',
41
'sender' => sprintf( '[your-name] <%s>', self::from_email() ),
42
'body' =>
43
sprintf( __( 'From: %s', 'contact-form-7' ),
@@ -61,7 +63,9 @@ class WPCF7_ContactFormTemplate {
61
public static function mail_2() {
62
$template = array(
63
'active' => false,
64
- 'subject' => '[your-subject]',
65
'sender' => sprintf( '%s <%s>',
66
get_bloginfo( 'name' ), self::from_email() ),
67
'body' =>
@@ -116,56 +120,56 @@ function wpcf7_messages() {
116
'description'
117
=> __( "Sender's message was sent successfully", 'contact-form-7' ),
118
'default'
119
- => __( 'Your message was sent successfully. Thanks.', 'contact-form-7' )
120
),
121
122
'mail_sent_ng' => array(
123
'description'
124
- => __( "Sender's message was failed to send", 'contact-form-7' ),
125
'default'
126
- => __( 'Failed to send your message. Please try later or contact the administrator by another method.', 'contact-form-7' )
127
),
128
129
'validation_error' => array(
130
'description'
131
=> __( "Validation errors occurred", 'contact-form-7' ),
132
'default'
133
- => __( 'Validation errors occurred. Please confirm the fields and submit it again.', 'contact-form-7' )
134
),
135
136
'spam' => array(
137
'description'
138
=> __( "Submission was referred to as spam", 'contact-form-7' ),
139
'default'
140
- => __( 'Failed to send your message. Please try later or contact the administrator by another method.', 'contact-form-7' )
141
),
142
143
'accept_terms' => array(
144
'description'
145
=> __( "There are terms that the sender must accept", 'contact-form-7' ),
146
'default'
147
- => __( 'Please accept the terms to proceed.', 'contact-form-7' )
148
),
149
150
'invalid_required' => array(
151
'description'
152
=> __( "There is a field that the sender must fill in", 'contact-form-7' ),
153
'default'
154
- => __( 'Please fill in the required field.', 'contact-form-7' )
155
),
156
157
'invalid_too_long' => array(
158
'description'
159
- => __( "There is a field that the user input is longer than the maximum allowed length", 'contact-form-7' ),
160
'default'
161
- => __( 'This input is too long.', 'contact-form-7' )
162
),
163
164
'invalid_too_short' => array(
165
'description'
166
- => __( "There is a field that the user input is shorter than the minimum allowed length", 'contact-form-7' ),
167
'default'
168
- => __( 'This input is too short.', 'contact-form-7' )
169
)
170
);
171
37
38
public static function mail() {
39
$template = array(
40
+ 'subject' => sprintf(
41
+ _x( '%1$s "%2$s"', 'mail subject', 'contact-form-7' ),
42
+ get_bloginfo( 'name' ), '[your-subject]' ),
43
'sender' => sprintf( '[your-name] <%s>', self::from_email() ),
44
'body' =>
45
sprintf( __( 'From: %s', 'contact-form-7' ),
63
public static function mail_2() {
64
$template = array(
65
'active' => false,
66
+ 'subject' => sprintf(
67
+ _x( '%1$s "%2$s"', 'mail subject', 'contact-form-7' ),
68
+ get_bloginfo( 'name' ), '[your-subject]' ),
69
'sender' => sprintf( '%s <%s>',
70
get_bloginfo( 'name' ), self::from_email() ),
71
'body' =>
120
'description'
121
=> __( "Sender's message was sent successfully", 'contact-form-7' ),
122
'default'
123
+ => __( "Thank you for your message. It has been sent.", 'contact-form-7' )
124
),
125
126
'mail_sent_ng' => array(
127
'description'
128
+ => __( "Sender's message failed to send", 'contact-form-7' ),
129
'default'
130
+ => __( "There was an error trying to send your message. Please try again later.", 'contact-form-7' )
131
),
132
133
'validation_error' => array(
134
'description'
135
=> __( "Validation errors occurred", 'contact-form-7' ),
136
'default'
137
+ => __( "One or more fields have an error. Please check and try again.", 'contact-form-7' )
138
),
139
140
'spam' => array(
141
'description'
142
=> __( "Submission was referred to as spam", 'contact-form-7' ),
143
'default'
144
+ => __( "There was an error trying to send your message. Please try again later.", 'contact-form-7' )
145
),
146
147
'accept_terms' => array(
148
'description'
149
=> __( "There are terms that the sender must accept", 'contact-form-7' ),
150
'default'
151
+ => __( "You must accept the terms and conditions before sending your message.", 'contact-form-7' )
152
),
153
154
'invalid_required' => array(
155
'description'
156
=> __( "There is a field that the sender must fill in", 'contact-form-7' ),
157
'default'
158
+ => __( "The field is required.", 'contact-form-7' )
159
),
160
161
'invalid_too_long' => array(
162
'description'
163
+ => __( "There is a field with input that is longer than the maximum allowed length", 'contact-form-7' ),
164
'default'
165
+ => __( "The field is too long.", 'contact-form-7' )
166
),
167
168
'invalid_too_short' => array(
169
'description'
170
+ => __( "There is a field with input that is shorter than the minimum allowed length", 'contact-form-7' ),
171
'default'
172
+ => __( "The field is too short.", 'contact-form-7' )
173
)
174
);
175
includes/contact-form.php CHANGED
@@ -14,6 +14,7 @@ class WPCF7_ContactForm {
14
private $unit_tag;
15
private $responses_count = 0;
16
private $scanned_form_tags;
17
18
public static function count() {
19
return self::$found_items;
@@ -654,6 +655,7 @@ class WPCF7_ContactForm {
654
$message = isset( $messages[$status] ) ? $messages[$status] : '';
655
656
if ( $filter ) {
657
$message = wpcf7_mail_replace_tags( $message, array( 'html' => true ) );
658
$message = apply_filters( 'wpcf7_display_message', $message, $status );
659
}
@@ -809,6 +811,41 @@ class WPCF7_ContactForm {
809
810
return apply_filters( 'wpcf7_contact_form_shortcode', $shortcode, $args, $this );
811
}
812
}
813
814
function wpcf7_contact_form( $id ) {
14
private $unit_tag;
15
private $responses_count = 0;
16
private $scanned_form_tags;
17
+ private $config_validator;
18
19
public static function count() {
20
return self::$found_items;
655
$message = isset( $messages[$status] ) ? $messages[$status] : '';
656
657
if ( $filter ) {
658
+ $message = wp_strip_all_tags( $message );
659
$message = wpcf7_mail_replace_tags( $message, array( 'html' => true ) );
660
$message = apply_filters( 'wpcf7_display_message', $message, $status );
661
}
811
812
return apply_filters( 'wpcf7_contact_form_shortcode', $shortcode, $args, $this );
813
}
814
+
815
+ public function validate_configuration() {
816
+ if ( ! $this->initial() ) {
817
+ if ( ! $this->config_validator ) {
818
+ $this->config_validator = new WPCF7_ConfigValidator( $this );
819
+ }
820
+
821
+ $this->config_validator->validate();
822
+ }
823
+ }
824
+
825
+ public function get_config_errors() {
826
+ if ( ! $this->initial() ) {
827
+ if ( ! $this->config_validator ) {
828
+ $this->config_validator = new WPCF7_ConfigValidator( $this );
829
+ }
830
+
831
+ return $this->config_validator->get_errors();
832
+ }
833
+
834
+ return array();
835
+ }
836
+
837
+ public function config_error( $section ) {
838
+ if ( ! $this->initial() ) {
839
+ if ( ! $this->config_validator ) {
840
+ $this->config_validator = new WPCF7_ConfigValidator( $this );
841
+ }
842
+
843
+ return $this->config_validator->get_error_message( $section );
844
+ }
845
+
846
+ return '';
847
+ }
848
+
849
}
850
851
function wpcf7_contact_form( $id ) {
includes/functions.php CHANGED
@@ -107,6 +107,11 @@ function wpcf7_use_really_simple_captcha() {
107
WPCF7_USE_REALLY_SIMPLE_CAPTCHA );
108
}
109
110
function wpcf7_load_js() {
111
return apply_filters( 'wpcf7_load_js', WPCF7_LOAD_JS );
112
}
107
WPCF7_USE_REALLY_SIMPLE_CAPTCHA );
108
}
109
110
+ function wpcf7_validate_configuration() {
111
+ return apply_filters( 'wpcf7_validate_configuration',
112
+ WPCF7_VALIDATE_CONFIGURATION );
113
+ }
114
+
115
function wpcf7_load_js() {
116
return apply_filters( 'wpcf7_load_js', WPCF7_LOAD_JS );
117
}
includes/integration.php CHANGED
@@ -81,7 +81,7 @@ class WPCF7_Integration {
81
?>
82
<div class="card<?php echo $service->is_active() ? ' active' : ''; ?>" id="<?php echo esc_attr( $name ); ?>">
83
<?php $service->icon(); ?>
84
- <h3 class="title"><?php echo esc_html( $service->get_title() ); ?></h3>
85
<div class="infobox">
86
<?php echo esc_html( implode( ', ', $cats ) ); ?>
87
<br />
81
?>
82
<div class="card<?php echo $service->is_active() ? ' active' : ''; ?>" id="<?php echo esc_attr( $name ); ?>">
83
<?php $service->icon(); ?>
84
+ <h2 class="title"><?php echo esc_html( $service->get_title() ); ?></h2>
85
<div class="infobox">
86
<?php echo esc_html( implode( ', ', $cats ) ); ?>
87
<br />
includes/l10n.php CHANGED
@@ -7,79 +7,33 @@ function wpcf7_l10n() {
7
return $l10n;
8
}
9
10
- $l10n = array(
11
- 'af' => __( 'Afrikaans', 'contact-form-7' ),
12
- 'sq' => __( 'Albanian', 'contact-form-7' ),
13
- 'ar' => __( 'Arabic', 'contact-form-7' ),
14
- 'hy_AM' => __( 'Armenian', 'contact-form-7' ),
15
- 'az' => __( 'Azerbaijani', 'contact-form-7' ),
16
- 'bn_BD' => __( 'Bangla', 'contact-form-7' ),
17
- 'eu' => __( 'Basque', 'contact-form-7' ),
18
- 'be_BY' => __( 'Belarusian', 'contact-form-7' ),
19
- 'bs_BA' => __( 'Bosnian', 'contact-form-7' ),
20
- 'bg_BG' => __( 'Bulgarian', 'contact-form-7' ),
21
- 'ca' => __( 'Catalan', 'contact-form-7' ),
22
- 'ckb' => __( 'Central Kurdish', 'contact-form-7' ),
23
- 'zh_CN' => __( 'Chinese (China)', 'contact-form-7' ),
24
- 'zh_TW' => __( 'Chinese (Taiwan)', 'contact-form-7' ),
25
- 'hr' => __( 'Croatian', 'contact-form-7' ),
26
- 'cs_CZ' => __( 'Czech', 'contact-form-7' ),
27
- 'da_DK' => __( 'Danish', 'contact-form-7' ),
28
- 'nl_NL' => __( 'Dutch', 'contact-form-7' ),
29
- 'en_US' => __( 'English (United States)', 'contact-form-7' ),
30
- 'eo_EO' => __( 'Esperanto', 'contact-form-7' ),
31
- 'et' => __( 'Estonian', 'contact-form-7' ),
32
- 'fi' => __( 'Finnish', 'contact-form-7' ),
33
- 'fr_FR' => __( 'French (France)', 'contact-form-7' ),
34
- 'gl_ES' => __( 'Galician', 'contact-form-7' ),
35
- 'gu_IN' => __( 'Gujarati', 'contact-form-7' ),
36
- 'ka_GE' => __( 'Georgian', 'contact-form-7' ),
37
- 'de_DE' => __( 'German', 'contact-form-7' ),
38
- 'el' => __( 'Greek', 'contact-form-7' ),
39
- 'ht' => __( 'Haitian', 'contact-form-7' ),
40
- 'he_IL' => __( 'Hebrew', 'contact-form-7' ),
41
- 'hi_IN' => __( 'Hindi', 'contact-form-7' ),
42
- 'hu_HU' => __( 'Hungarian', 'contact-form-7' ),
43
- 'bn_IN' => __( 'Indian Bengali', 'contact-form-7' ),
44
- 'id_ID' => __( 'Indonesian', 'contact-form-7' ),
45
- 'ga_IE' => __( 'Irish', 'contact-form-7' ),
46
- 'it_IT' => __( 'Italian', 'contact-form-7' ),
47
- 'ja' => __( 'Japanese', 'contact-form-7' ),
48
- 'ko_KR' => __( 'Korean', 'contact-form-7' ),
49
- 'lv' => __( 'Latvian', 'contact-form-7' ),
50
- 'lt_LT' => __( 'Lithuanian', 'contact-form-7' ),
51
- 'mk_MK' => __( 'Macedonian', 'contact-form-7' ),
52
- 'ms_MY' => __( 'Malay', 'contact-form-7' ),
53
- 'ml_IN' => __( 'Malayalam', 'contact-form-7' ),
54
- 'mt_MT' => __( 'Maltese', 'contact-form-7' ),
55
- 'nb_NO' => __( 'Norwegian (Bokmål)', 'contact-form-7' ),
56
- 'fa_IR' => __( 'Persian', 'contact-form-7' ),
57
- 'pl_PL' => __( 'Polish', 'contact-form-7' ),
58
- 'pt_BR' => __( 'Portuguese (Brazil)', 'contact-form-7' ),
59
- 'pt_PT' => __( 'Portuguese (Portugal)', 'contact-form-7' ),
60
- 'pa_IN' => __( 'Punjabi', 'contact-form-7' ),
61
- 'ru_RU' => __( 'Russian', 'contact-form-7' ),
62
- 'ro_RO' => __( 'Romanian', 'contact-form-7' ),
63
- 'sr_RS' => __( 'Serbian', 'contact-form-7' ),
64
- 'si_LK' => __( 'Sinhala', 'contact-form-7' ),
65
- 'sk_SK' => __( 'Slovak', 'contact-form-7' ),
66
- 'sl_SI' => __( 'Slovene', 'contact-form-7' ),
67
- 'es_ES' => __( 'Spanish (Spain)', 'contact-form-7' ),
68
- 'sv_SE' => __( 'Swedish', 'contact-form-7' ),
69
- 'ta' => __( 'Tamil', 'contact-form-7' ),
70
- 'th' => __( 'Thai', 'contact-form-7' ),
71
- 'tl' => __( 'Tagalog', 'contact-form-7' ),
72
- 'tr_TR' => __( 'Turkish', 'contact-form-7' ),
73
- 'uk' => __( 'Ukrainian', 'contact-form-7' ),
74
- 'vi' => __( 'Vietnamese', 'contact-form-7' )
75
- );
76
77
return $l10n;
78
}
79
80
function wpcf7_is_valid_locale( $locale ) {
81
- $l10n = wpcf7_l10n();
82
- return isset( $l10n[$locale] );
83
}
84
85
function wpcf7_is_rtl( $locale = '' ) {
7
return $l10n;
8
}
9
10
+ if ( ! is_admin() ) {
11
+ return $l10n;
12
+ }
13
+
14
+ require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
15
+
16
+ $api = translations_api( 'plugins', array(
17
+ 'slug' => 'contact-form-7',
18
+ 'version' => WPCF7_VERSION ) );
19
+
20
+ if ( is_wp_error( $api ) || empty( $api['translations'] ) ) {
21
+ return $l10n;
22
+ }
23
+
24
+ foreach ( (array) $api['translations'] as $translation ) {
25
+ if ( ! empty( $translation['language'] )
26
+ && ! empty( $translation['english_name'] ) ) {
27
+ $l10n[$translation['language']] = $translation['english_name'];
28
+ }
29
+ }
30
31
return $l10n;
32
}
33
34
function wpcf7_is_valid_locale( $locale ) {
35
+ $pattern = '/^[a-z]{2,3}(?:_[a-zA-Z_]{2,})?#x2F;';
36
+ return (bool) preg_match( $pattern, $locale );
37
}
38
39
function wpcf7_is_rtl( $locale = '' ) {
includes/mail.php CHANGED
@@ -72,6 +72,9 @@ class WPCF7_Mail {
72
73
if ( $use_html ) {
74
$headers .= "Content-Type: text/html\n";
75
}
76
77
if ( $additional_headers ) {
@@ -165,16 +168,45 @@ function wpcf7_mail_replace_tags( $content, $args = '' ) {
165
return $content;
166
}
167
168
class WPCF7_MailTaggedText {
169
170
private $html = false;
171
private $content = '';
172
private $replaced_tags = array();
173
174
public function __construct( $content, $args = '' ) {
175
- $args = wp_parse_args( $args, array( 'html' => false ) );
176
177
$this->html = (bool) $args['html'];
178
$this->content = $content;
179
}
180
@@ -188,13 +220,7 @@ class WPCF7_MailTaggedText {
188
. '((?:[\t ]+"[^"]*"|[\t ]+\'[^\']*\')*)' // [3] = values
189
. '[\t ]*\](\]?)/';
190
191
- if ( $this->html ) {
192
- $callback = array( $this, 'replace_tags_callback_html' );
193
- } else {
194
- $callback = array( $this, 'replace_tags_callback' );
195
- }
196
-
197
- return preg_replace_callback( $regex, $callback, $this->content );
198
}
199
200
private function replace_tags_callback_html( $matches ) {
@@ -377,4 +403,4 @@ function wpcf7_special_mail_tag( $output, $name, $html ) {
377
return $output;
378
}
379
380
- ?>
72
73
if ( $use_html ) {
74
$headers .= "Content-Type: text/html\n";
75
+ $headers .= "X-WPCF7-Content-Type: text/html\n";
76
+ } else {
77
+ $headers .= "X-WPCF7-Content-Type: text/plain\n";
78
}
79
80
if ( $additional_headers ) {
168
return $content;
169
}
170
171
+ add_action( 'phpmailer_init', 'wpcf7_phpmailer_init' );
172
+
173
+ function wpcf7_phpmailer_init( $phpmailer ) {
174
+ $wpcf7_content_type = false;
175
+
176
+ foreach ( (array) $phpmailer->getCustomHeaders() as $custom_header ) {
177
+ if ( 'X-WPCF7-Content-Type' == $custom_header[0] ) {
178
+ $wpcf7_content_type = trim( $custom_header[1] );
179
+ break;
180
+ }
181
+ }
182
+
183
+ if ( 'text/html' == $wpcf7_content_type ) {
184
+ $phpmailer->msgHTML( $phpmailer->Body );
185
+ }
186
+ }
187
+
188
class WPCF7_MailTaggedText {
189
190
private $html = false;
191
+ private $callback = null;
192
private $content = '';
193
private $replaced_tags = array();
194
195
public function __construct( $content, $args = '' ) {
196
+ $args = wp_parse_args( $args, array(
197
+ 'html' => false,
198
+ 'callback' => null ) );
199
200
$this->html = (bool) $args['html'];
201
+
202
+ if ( null !== $args['callback'] && is_callable( $args['callback'] ) ) {
203
+ $this->callback = $args['callback'];
204
+ } elseif ( $this->html ) {
205
+ $this->callback = array( $this, 'replace_tags_callback_html' );
206
+ } else {
207
+ $this->callback = array( $this, 'replace_tags_callback' );
208
+ }
209
+
210
$this->content = $content;
211
}
212
220
. '((?:[\t ]+"[^"]*"|[\t ]+\'[^\']*\')*)' // [3] = values
221
. '[\t ]*\](\]?)/';
222
223
+ return preg_replace_callback( $regex, $this->callback, $this->content );
224
}
225
226
private function replace_tags_callback_html( $matches ) {
403
return $output;
404
}
405
406
+ ?>
languages/contact-form-7-az.mo DELETED
Binary file
languages/{contact-form-7-be_BY.mo → contact-form-7-bel.mo} RENAMED
File without changes
languages/{contact-form-7-eo_EO.mo → contact-form-7-eo.mo} RENAMED
File without changes
languages/{contact-form-7-ga_IE.mo → contact-form-7-ga.mo} RENAMED
File without changes
languages/{contact-form-7-gu_IN.mo → contact-form-7-gu.mo} RENAMED
File without changes
languages/contact-form-7-hr.mo DELETED
Binary file
languages/contact-form-7-hu_HU.mo DELETED
Binary file
languages/{contact-form-7-hy_AM.mo → contact-form-7-hy.mo} RENAMED
File without changes
languages/contact-form-7-ja.mo DELETED
Binary file
languages/contact-form-7-nl_NL.mo DELETED
Binary file
languages/contact-form-7-pt_PT.mo DELETED
Binary file
languages/contact-form-7-sv_SE.mo DELETED
Binary file
languages/{contact-form-7-ta.mo → contact-form-7-ta_IN.mo} RENAMED
File without changes
languages/contact-form-7.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
msgstr ""
4
"Project-Id-Version: Contact Form 7\n"
5
"Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2015-11-24 01:46+0900\n"
7
"PO-Revision-Date: 2015-05-18 21:49+0900\n"
8
"Last-Translator: Takayuki Miyoshi <takayukister@gmail.com>\n"
9
"Language-Team: \n"
@@ -11,7 +11,7 @@ msgstr ""
11
"Content-Type: text/plain; charset=UTF-8\n"
12
"Content-Transfer-Encoding: 8bit\n"
13
"X-Poedit-SourceCharset: UTF-8\n"
14
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_c\n"
15
"X-Poedit-Basepath: ../..\n"
16
"Plural-Forms: nplurals=1; plural=0;\n"
17
"X-Generator: Poedit 1.8.6\n"
@@ -21,204 +21,239 @@ msgstr ""
21
msgid "Just another contact form plugin. Simple but flexible."
22
msgstr ""
23
24
- #: contact-form-7/admin/admin.php:16 contact-form-7/modules/flamingo.php:136
25
msgid "Contact Form 7"
26
msgstr ""
27
28
- #: contact-form-7/admin/admin.php:17
29
msgid "Contact"
30
msgstr ""
31
32
- #: contact-form-7/admin/admin.php:22
33
#: contact-form-7/admin/edit-contact-form.php:38
34
msgid "Edit Contact Form"
35
msgstr ""
36
37
- #: contact-form-7/admin/admin.php:23 contact-form-7/admin/admin.php:239
38
- #: contact-form-7/includes/contact-form.php:29
39
msgid "Contact Forms"
40
msgstr ""
41
42
- #: contact-form-7/admin/admin.php:30 contact-form-7/admin/admin.php:283
43
#: contact-form-7/admin/edit-contact-form.php:36
44
msgid "Add New Contact Form"
45
msgstr ""
46
47
- #: contact-form-7/admin/admin.php:31 contact-form-7/admin/admin.php:242
48
- #: contact-form-7/admin/admin.php:288 contact-form-7/admin/admin.php:300
49
#: contact-form-7/admin/edit-contact-form.php:41
50
msgid "Add New"
51
msgstr ""
52
53
- #: contact-form-7/admin/admin.php:41 contact-form-7/admin/admin.php:325
54
msgid "Integration with Other Services"
55
msgstr ""
56
57
- #: contact-form-7/admin/admin.php:42
58
msgid "Integration"
59
msgstr ""
60
61
- #: contact-form-7/admin/admin.php:72 contact-form-7/admin/admin.php:94
62
msgid "You are not allowed to edit this item."
63
msgstr ""
64
65
- #: contact-form-7/admin/admin.php:133
66
msgid "You are not allowed to delete this item."
67
msgstr ""
68
69
- #: contact-form-7/admin/admin.php:136
70
msgid "Error in deleting."
71
msgstr ""
72
73
- #: contact-form-7/admin/admin.php:213
74
msgid "The changes you made will be lost if you navigate away from this page."
75
msgstr ""
76
77
- #: contact-form-7/admin/admin.php:247
78
#, php-format
79
msgid "Search results for &#8220;%s&#8221;"
80
msgstr ""
81
82
- #: contact-form-7/admin/admin.php:256
83
msgid "Search Contact Forms"
84
msgstr ""
85
86
- #: contact-form-7/admin/admin.php:287
87
#, php-format
88
- msgid "Use the default language (%s)"
89
- msgstr ""
90
-
91
- #: contact-form-7/admin/admin.php:291
92
- msgid "Or"
93
- msgstr ""
94
95
- #: contact-form-7/admin/admin.php:295
96
- msgid "(select language)"
97
msgstr ""
98
99
- #: contact-form-7/admin/admin.php:354
100
msgid "Contact form created."
101
msgstr ""
102
103
- #: contact-form-7/admin/admin.php:356
104
msgid "Contact form saved."
105
msgstr ""
106
107
- #: contact-form-7/admin/admin.php:358
108
msgid "Contact form deleted."
109
msgstr ""
110
111
- #: contact-form-7/admin/admin.php:373
112
msgid "Settings"
113
msgstr ""
114
115
- #: contact-form-7/admin/admin.php:391
116
#, php-format
117
msgid ""
118
"<strong>Contact Form 7 %1$s requires WordPress %2$s or higher.</strong> "
119
"Please <a href=\"%3$s\">update WordPress</a> first."
120
msgstr ""
121
122
- #: contact-form-7/admin/admin.php:417
123
msgid "Dismiss"
124
msgstr ""
125
126
- #: contact-form-7/admin/admin.php:422
127
msgid "Contact Form 7 Needs Your Support"
128
msgstr ""
129
130
- #: contact-form-7/admin/admin.php:423
131
msgid ""
132
"It is hard to continue development and support for this plugin without "
133
"contributions from users like you. If you enjoy using Contact Form 7 and "
134
"find it useful, please consider making a donation."
135
msgstr ""
136
137
- #: contact-form-7/admin/admin.php:424
138
msgid "http://contactform7.com/donate/"
139
msgstr ""
140
141
- #: contact-form-7/admin/admin.php:424
142
msgid "Donate"
143
msgstr ""
144
145
- #: contact-form-7/admin/admin.php:428
146
msgid "Get Started"
147
msgstr ""
148
149
- #: contact-form-7/admin/admin.php:430
150
msgid "http://contactform7.com/getting-started-with-contact-form-7/"
151
msgstr ""
152
153
- #: contact-form-7/admin/admin.php:430
154
msgid "Getting Started with Contact Form 7"
155
msgstr ""
156
157
- #: contact-form-7/admin/admin.php:431
158
msgid "http://contactform7.com/admin-screen/"
159
msgstr ""
160
161
- #: contact-form-7/admin/admin.php:431
162
msgid "Admin Screen"
163
msgstr ""
164
165
- #: contact-form-7/admin/admin.php:432
166
msgid "http://contactform7.com/tag-syntax/"
167
msgstr ""
168
169
- #: contact-form-7/admin/admin.php:432
170
msgid "How Tags Work"
171
msgstr ""
172
173
- #: contact-form-7/admin/admin.php:433
174
msgid "http://contactform7.com/setting-up-mail/"
175
msgstr ""
176
177
- #: contact-form-7/admin/admin.php:433
178
msgid "Setting Up Mail"
179
msgstr ""
180
181
- #: contact-form-7/admin/admin.php:438
182
msgid "Did You Know?"
183
msgstr ""
184
185
- #: contact-form-7/admin/admin.php:440
186
msgid "http://contactform7.com/spam-filtering-with-akismet/"
187
msgstr ""
188
189
- #: contact-form-7/admin/admin.php:440
190
msgid "Spam Filtering with Akismet"
191
msgstr ""
192
193
- #: contact-form-7/admin/admin.php:441
194
msgid "http://contactform7.com/save-submitted-messages-with-flamingo/"
195
msgstr ""
196
197
- #: contact-form-7/admin/admin.php:441
198
msgid "Save Messages with Flamingo"
199
msgstr ""
200
201
- #: contact-form-7/admin/admin.php:442
202
msgid "http://contactform7.com/selectable-recipient-with-pipes/"
203
msgstr ""
204
205
- #: contact-form-7/admin/admin.php:442
206
msgid "Selectable Recipient with Pipes"
207
msgstr ""
208
209
- #: contact-form-7/admin/admin.php:443
210
msgid ""
211
"http://contactform7.com/tracking-form-submissions-with-google-analytics/"
212
msgstr ""
213
214
- #: contact-form-7/admin/admin.php:443
215
msgid "Tracking with Google Analytics"
216
msgstr ""
217
218
- #: contact-form-7/admin/admin.php:488
219
msgid "You are not allowed to edit this contact form."
220
msgstr ""
221
222
#: contact-form-7/admin/edit-contact-form.php:26
223
#: contact-form-7/admin/edit-contact-form.php:124
224
#: contact-form-7/modules/recaptcha.php:206
@@ -244,7 +279,7 @@ msgid "Status"
244
msgstr ""
245
246
#: contact-form-7/admin/edit-contact-form.php:131
247
- #: contact-form-7/admin/includes/class-contact-forms-list-table.php:116
248
msgid "Duplicate"
249
msgstr ""
250
@@ -264,32 +299,32 @@ msgid "Information"
264
msgstr ""
265
266
#: contact-form-7/admin/edit-contact-form.php:161
267
- #: contact-form-7/admin/includes/help-tabs.php:103
268
msgid "http://contactform7.com/docs/"
269
msgstr ""
270
271
#: contact-form-7/admin/edit-contact-form.php:161
272
- #: contact-form-7/admin/includes/help-tabs.php:103
273
msgid "Docs"
274
msgstr ""
275
276
#: contact-form-7/admin/edit-contact-form.php:162
277
- #: contact-form-7/admin/includes/help-tabs.php:104
278
msgid "http://contactform7.com/faq/"
279
msgstr ""
280
281
#: contact-form-7/admin/edit-contact-form.php:162
282
- #: contact-form-7/admin/includes/help-tabs.php:104
283
msgid "FAQ"
284
msgstr ""
285
286
#: contact-form-7/admin/edit-contact-form.php:163
287
- #: contact-form-7/admin/includes/help-tabs.php:105
288
msgid "http://contactform7.com/support/"
289
msgstr ""
290
291
#: contact-form-7/admin/edit-contact-form.php:163
292
- #: contact-form-7/admin/includes/help-tabs.php:105
293
msgid "Support"
294
msgstr ""
295
@@ -309,7 +344,7 @@ msgid "Mail"
309
msgstr ""
310
311
#: contact-form-7/admin/edit-contact-form.php:188
312
- #: contact-form-7/admin/includes/editor.php:172
313
msgid "Messages"
314
msgstr ""
315
@@ -319,8 +354,8 @@ msgid "Additional Settings (%d)"
319
msgstr ""
320
321
#: contact-form-7/admin/edit-contact-form.php:201
322
- #: contact-form-7/admin/includes/editor.php:195
323
- #: contact-form-7/admin/includes/editor.php:200
324
msgid "Additional Settings"
325
msgstr ""
326
@@ -341,24 +376,30 @@ msgid "Date"
341
msgstr ""
342
343
#: contact-form-7/admin/includes/class-contact-forms-list-table.php:106
344
- msgid "Edit"
345
msgstr ""
346
347
- #: contact-form-7/admin/includes/class-contact-forms-list-table.php:121
348
#, php-format
349
- msgid "Edit &#8220;%s&#8221;"
350
msgstr ""
351
352
- #: contact-form-7/admin/includes/class-contact-forms-list-table.php:165
353
msgid "Y/m/d g:i:s A"
354
msgstr ""
355
356
- #: contact-form-7/admin/includes/class-contact-forms-list-table.php:172
357
#, php-format
358
msgid "%s ago"
359
msgstr ""
360
361
- #: contact-form-7/admin/includes/class-contact-forms-list-table.php:174
362
msgid "Y/m/d"
363
msgstr ""
364
@@ -370,63 +411,63 @@ msgstr ""
370
msgid "Use Mail (2)"
371
msgstr ""
372
373
- #: contact-form-7/admin/includes/editor.php:90
374
msgid "Mail (2) is an additional mail template often used as an autoresponder."
375
msgstr ""
376
377
- #: contact-form-7/admin/includes/editor.php:96
378
msgid "In the following fields, you can use these mail-tags:"
379
msgstr ""
380
381
- #: contact-form-7/admin/includes/editor.php:102
382
msgid "To"
383
msgstr ""
384
385
- #: contact-form-7/admin/includes/editor.php:111
386
msgid "From"
387
msgstr ""
388
389
- #: contact-form-7/admin/includes/editor.php:120
390
#: contact-form-7/includes/contact-form-template.php:29
391
msgid "Subject"
392
msgstr ""
393
394
- #: contact-form-7/admin/includes/editor.php:129
395
msgid "Additional Headers"
396
msgstr ""
397
398
- #: contact-form-7/admin/includes/editor.php:138
399
msgid "Message Body"
400
msgstr ""
401
402
- #: contact-form-7/admin/includes/editor.php:143
403
msgid "Exclude lines with blank mail-tags from output"
404
msgstr ""
405
406
- #: contact-form-7/admin/includes/editor.php:145
407
msgid "Use HTML content type"
408
msgstr ""
409
410
- #: contact-form-7/admin/includes/editor.php:151
411
msgid "File Attachments"
412
msgstr ""
413
414
- #: contact-form-7/admin/includes/editor.php:174
415
msgid "Edit messages used in the following situations."
416
msgstr ""
417
418
- #: contact-form-7/admin/includes/editor.php:194
419
msgid "http://contactform7.com/additional-settings/"
420
msgstr ""
421
422
- #: contact-form-7/admin/includes/editor.php:196
423
#, php-format
424
msgid "You can add customization code snippets here. For details, see %s."
425
msgstr ""
426
427
#: contact-form-7/admin/includes/help-tabs.php:16
428
- #: contact-form-7/admin/includes/help-tabs.php:39
429
- #: contact-form-7/admin/includes/help-tabs.php:58
430
msgid "Overview"
431
msgstr ""
432
@@ -434,19 +475,15 @@ msgstr ""
434
msgid "Available Actions"
435
msgstr ""
436
437
- #: contact-form-7/admin/includes/help-tabs.php:30
438
- msgid "Adding A New Contact Form"
439
- msgstr ""
440
-
441
- #: contact-form-7/admin/includes/help-tabs.php:44
442
msgid "Form-tags"
443
msgstr ""
444
445
- #: contact-form-7/admin/includes/help-tabs.php:49
446
msgid "Mail-tags"
447
msgstr ""
448
449
- #: contact-form-7/admin/includes/help-tabs.php:70
450
msgid ""
451
"On this screen, you can manage contact forms provided by Contact Form 7. You "
452
"can manage an unlimited number of contact forms. Each contact form has a "
@@ -455,78 +492,71 @@ msgid ""
455
"target."
456
msgstr ""
457
458
- #: contact-form-7/admin/includes/help-tabs.php:72
459
msgid ""
460
"Hovering over a row in the contact forms list will display action links that "
461
"allow you to manage your contact form. You can perform the following actions:"
462
msgstr ""
463
464
- #: contact-form-7/admin/includes/help-tabs.php:73
465
msgid ""
466
"<strong>Edit</strong> - Navigates to the editing screen for that contact "
467
"form. You can also reach that screen by clicking on the contact form title."
468
msgstr ""
469
470
- #: contact-form-7/admin/includes/help-tabs.php:74
471
msgid ""
472
"<strong>Duplicate</strong> - Clones that contact form. A cloned contact form "
473
"inherits all content from the original, but has a different ID."
474
msgstr ""
475
476
- #: contact-form-7/admin/includes/help-tabs.php:76
477
- msgid ""
478
- "You can add a new contact form on this screen. You can create a contact form "
479
- "in your language, which is set WordPress local settings, or in a language "
480
- "that you select from available options."
481
- msgstr ""
482
-
483
- #: contact-form-7/admin/includes/help-tabs.php:78
484
msgid ""
485
"On this screen, you can edit a contact form. A contact form is comprised of "
486
"the following components:"
487
msgstr ""
488
489
- #: contact-form-7/admin/includes/help-tabs.php:79
490
msgid ""
491
"<strong>Title</strong> is the title of a contact form. This title is only "
492
"used for labeling a contact form, and can be edited."
493
msgstr ""
494
495
- #: contact-form-7/admin/includes/help-tabs.php:80
496
msgid ""
497
"<strong>Form</strong> is a content of HTML form. You can use arbitrary HTML, "
498
"which is allowed inside a form element. You can also use Contact Form "
499
"7&#8217;s form-tags here."
500
msgstr ""
501
502
- #: contact-form-7/admin/includes/help-tabs.php:81
503
msgid ""
504
"<strong>Mail</strong> manages a mail template (headers and message body) "
505
"that this contact form will send when users submit it. You can use Contact "
506
"Form 7&#8217;s mail-tags here."
507
msgstr ""
508
509
- #: contact-form-7/admin/includes/help-tabs.php:82
510
msgid ""
511
"<strong>Mail (2)</strong> is an additional mail template that works similar "
512
"to Mail. Mail (2) is different in that it is sent only when Mail has been "
513
"sent successfully."
514
msgstr ""
515
516
- #: contact-form-7/admin/includes/help-tabs.php:83
517
msgid ""
518
"In <strong>Messages</strong>, you can edit various types of messages used "
519
"for this contact form. These messages are relatively short messages, like a "
520
"validation error message you see when you leave a required field blank."
521
msgstr ""
522
523
- #: contact-form-7/admin/includes/help-tabs.php:84
524
msgid ""
525
"<strong>Additional Settings</strong> provides a place where you can "
526
"customize the behavior of this contact form by adding code snippets."
527
msgstr ""
528
529
- #: contact-form-7/admin/includes/help-tabs.php:86
530
msgid ""
531
"A form-tag is a short code enclosed in square brackets used in a form "
532
"content. A form-tag generally represents an input field, and its components "
@@ -536,21 +566,21 @@ msgid ""
536
"fields, CAPTCHAs, and quiz fields."
537
msgstr ""
538
539
- #: contact-form-7/admin/includes/help-tabs.php:87
540
msgid ""
541
"While form-tags have a comparatively complex syntax, you don&#8217;t need to "
542
"know the syntax to add form-tags because you can use the straightforward tag "
543
"generator (<strong>Generate Tag</strong> button on this screen)."
544
msgstr ""
545
546
- #: contact-form-7/admin/includes/help-tabs.php:89
547
msgid ""
548
"A mail-tag is also a short code enclosed in square brackets that you can use "
549
"in every Mail and Mail (2) field. A mail-tag represents a user input value "
550
"through an input field of a corresponding form-tag."
551
msgstr ""
552
553
- #: contact-form-7/admin/includes/help-tabs.php:90
554
msgid ""
555
"There are also special mail-tags that have specific names, but don&#8217;t "
556
"have corresponding form-tags. They are used to represent meta information of "
@@ -558,27 +588,27 @@ msgid ""
558
"page."
559
msgstr ""
560
561
- #: contact-form-7/admin/includes/help-tabs.php:92
562
msgid ""
563
"On this screen, you can manage services that are available through Contact "
564
"Form 7. Using API will allow you to collaborate with any services that are "
565
"available."
566
msgstr ""
567
568
- #: contact-form-7/admin/includes/help-tabs.php:93
569
msgid ""
570
"You may need to first sign up for an account with the service that you plan "
571
"to use. When you do so, you would need to authorize Contact Form 7 to access "
572
"the service with your account."
573
msgstr ""
574
575
- #: contact-form-7/admin/includes/help-tabs.php:94
576
msgid ""
577
"Any information you provide will not be shared with service providers "
578
"without your authorization."
579
msgstr ""
580
581
- #: contact-form-7/admin/includes/help-tabs.php:102
582
msgid "For more information:"
583
msgstr ""
584
@@ -587,6 +617,22 @@ msgstr ""
587
msgid "Form-tag Generator: %s"
588
msgstr ""
589
590
#: contact-form-7/includes/contact-form-template.php:23
591
msgid "Your Name"
592
msgstr ""
@@ -609,105 +655,106 @@ msgstr ""
609
msgid "Send"
610
msgstr ""
611
612
- #: contact-form-7/includes/contact-form-template.php:43
613
#, php-format
614
- msgid "From: %s"
615
msgstr ""
616
617
#: contact-form-7/includes/contact-form-template.php:45
618
#, php-format
619
- msgid "Subject: %s"
620
msgstr ""
621
622
#: contact-form-7/includes/contact-form-template.php:47
623
- #: contact-form-7/includes/contact-form-template.php:68
624
msgid "Message Body:"
625
msgstr ""
626
627
- #: contact-form-7/includes/contact-form-template.php:50
628
- #: contact-form-7/includes/contact-form-template.php:71
629
#, php-format
630
msgid "This e-mail was sent from a contact form on %1$s (%2$s)"
631
msgstr ""
632
633
- #: contact-form-7/includes/contact-form-template.php:117
634
msgid "Sender's message was sent successfully"
635
msgstr ""
636
637
- #: contact-form-7/includes/contact-form-template.php:119
638
- msgid "Your message was sent successfully. Thanks."
639
msgstr ""
640
641
- #: contact-form-7/includes/contact-form-template.php:124
642
- msgid "Sender's message was failed to send"
643
msgstr ""
644
645
- #: contact-form-7/includes/contact-form-template.php:126
646
- #: contact-form-7/includes/contact-form-template.php:140
647
- msgid ""
648
- "Failed to send your message. Please try later or contact the administrator "
649
- "by another method."
650
msgstr ""
651
652
- #: contact-form-7/includes/contact-form-template.php:131
653
msgid "Validation errors occurred"
654
msgstr ""
655
656
- #: contact-form-7/includes/contact-form-template.php:133
657
- msgid ""
658
- "Validation errors occurred. Please confirm the fields and submit it again."
659
msgstr ""
660
661
- #: contact-form-7/includes/contact-form-template.php:138
662
msgid "Submission was referred to as spam"
663
msgstr ""
664
665
- #: contact-form-7/includes/contact-form-template.php:145
666
msgid "There are terms that the sender must accept"
667
msgstr ""
668
669
- #: contact-form-7/includes/contact-form-template.php:147
670
- msgid "Please accept the terms to proceed."
671
msgstr ""
672
673
- #: contact-form-7/includes/contact-form-template.php:152
674
msgid "There is a field that the sender must fill in"
675
msgstr ""
676
677
- #: contact-form-7/includes/contact-form-template.php:154
678
- msgid "Please fill in the required field."
679
msgstr ""
680
681
- #: contact-form-7/includes/contact-form-template.php:159
682
msgid ""
683
- "There is a field that the user input is longer than the maximum allowed "
684
- "length"
685
msgstr ""
686
687
- #: contact-form-7/includes/contact-form-template.php:161
688
- msgid "This input is too long."
689
msgstr ""
690
691
- #: contact-form-7/includes/contact-form-template.php:166
692
msgid ""
693
- "There is a field that the user input is shorter than the minimum allowed "
694
- "length"
695
msgstr ""
696
697
- #: contact-form-7/includes/contact-form-template.php:168
698
- msgid "This input is too short."
699
msgstr ""
700
701
- #: contact-form-7/includes/contact-form.php:30
702
msgid "Contact Form"
703
msgstr ""
704
705
- #: contact-form-7/includes/contact-form.php:76
706
- #: contact-form-7/includes/contact-form.php:226
707
msgid "Untitled"
708
msgstr ""
709
710
- #: contact-form-7/includes/contact-form.php:152
711
#, php-format
712
msgid ""
713
"<code>%1$s</code> property of a <code>WPCF7_ContactForm</code> object is "
@@ -722,262 +769,6 @@ msgstr ""
722
msgid "Sending ..."
723
msgstr ""
724
725
- #: contact-form-7/includes/l10n.php:11
726
- msgid "Afrikaans"
727
- msgstr ""
728
-
729
- #: contact-form-7/includes/l10n.php:12
730
- msgid "Albanian"
731
- msgstr ""
732
-
733
- #: contact-form-7/includes/l10n.php:13
734
- msgid "Arabic"
735
- msgstr ""
736
-
737
- #: contact-form-7/includes/l10n.php:14
738
- msgid "Armenian"
739
- msgstr ""
740
-
741
- #: contact-form-7/includes/l10n.php:15
742
- msgid "Azerbaijani"
743
- msgstr ""
744
-
745
- #: contact-form-7/includes/l10n.php:16
746
- msgid "Bangla"
747
- msgstr ""
748
-
749
- #: contact-form-7/includes/l10n.php:17
750
- msgid "Basque"
751
- msgstr ""
752
-
753
- #: contact-form-7/includes/l10n.php:18
754
- msgid "Belarusian"
755
- msgstr ""
756
-
757
- #: contact-form-7/includes/l10n.php:19
758
- msgid "Bosnian"
759
- msgstr ""
760
-
761
- #: contact-form-7/includes/l10n.php:20
762
- msgid "Bulgarian"
763
- msgstr ""
764
-
765
- #: contact-form-7/includes/l10n.php:21
766
- msgid "Catalan"
767
- msgstr ""
768
-
769
- #: contact-form-7/includes/l10n.php:22
770
- msgid "Central Kurdish"
771
- msgstr ""
772
-
773
- #: contact-form-7/includes/l10n.php:23
774
- msgid "Chinese (China)"
775
- msgstr ""
776
-
777
- #: contact-form-7/includes/l10n.php:24
778
- msgid "Chinese (Taiwan)"
779
- msgstr ""
780
-
781
- #: contact-form-7/includes/l10n.php:25
782
- msgid "Croatian"
783
- msgstr ""
784
-
785
- #: contact-form-7/includes/l10n.php:26
786
- msgid "Czech"
787
- msgstr ""
788
-
789
- #: contact-form-7/includes/l10n.php:27
790
- msgid "Danish"
791
- msgstr ""
792
-
793
- #: contact-form-7/includes/l10n.php:28
794
- msgid "Dutch"
795
- msgstr ""
796
-
797
- #: contact-form-7/includes/l10n.php:29
798
- msgid "English (United States)"
799
- msgstr ""
800
-
801
- #: contact-form-7/includes/l10n.php:30
802
- msgid "Esperanto"
803
- msgstr ""
804
-
805
- #: contact-form-7/includes/l10n.php:31
806
- msgid "Estonian"
807
- msgstr ""
808
-
809
- #: contact-form-7/includes/l10n.php:32
810
- msgid "Finnish"
811
- msgstr ""
812
-