Contact Form 7 - Version 3.6

Version Description

Download this release

Release Info

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

Code changes from version 3.5.4 to 3.6

Files changed (95) hide show
  1. admin/admin.php +162 -83
  2. admin/css/styles.css +19 -2
  3. admin/edit-contact-form.php +11 -11
  4. admin/includes/class-contact-forms-list-table.php +11 -11
  5. admin/includes/meta-boxes.php +7 -7
  6. admin/js/scripts.js +17 -0
  7. includes/classes.php +70 -25
  8. includes/controller.php +3 -3
  9. includes/css/styles-rtl.css +1 -5
  10. includes/css/styles.css +1 -13
  11. includes/functions.php +159 -87
  12. includes/js/jquery.form.js +16 -3
  13. includes/js/jquery.form.min.js +2 -2
  14. includes/js/scripts.js +105 -123
  15. includes/upgrade.php +76 -0
  16. languages/{wpcf7-af.mo → contact-form-7-af.mo} +0 -0
  17. languages/{wpcf7-ar.mo → contact-form-7-ar.mo} +0 -0
  18. languages/{wpcf7-az_AZ.mo → contact-form-7-az_AZ.mo} +0 -0
  19. languages/{wpcf7-be_BY.mo → contact-form-7-be_BY.mo} +0 -0
  20. languages/{wpcf7-bg_BG.mo → contact-form-7-bg_BG.mo} +0 -0
  21. languages/{wpcf7-bn_BD.mo → contact-form-7-bn_BD.mo} +0 -0
  22. languages/{wpcf7-bn_IN.mo → contact-form-7-bn_IN.mo} +0 -0
  23. languages/{wpcf7-bs.mo → contact-form-7-bs.mo} +0 -0
  24. languages/{wpcf7-ca.mo → contact-form-7-ca.mo} +0 -0
  25. languages/{wpcf7-ckb.mo → contact-form-7-ckb.mo} +0 -0
  26. languages/{wpcf7-cs_CZ.mo → contact-form-7-cs_CZ.mo} +0 -0
  27. languages/{wpcf7-da_DK.mo → contact-form-7-da_DK.mo} +0 -0
  28. languages/{wpcf7-de_DE.mo → contact-form-7-de_DE.mo} +0 -0
  29. languages/{wpcf7-el.mo → contact-form-7-el.mo} +0 -0
  30. languages/{wpcf7-eo_EO.mo → contact-form-7-eo_EO.mo} +0 -0
  31. languages/{wpcf7-es_ES.mo → contact-form-7-es_ES.mo} +0 -0
  32. languages/{wpcf7-et.mo → contact-form-7-et.mo} +0 -0
  33. languages/{wpcf7-eu.mo → contact-form-7-eu.mo} +0 -0
  34. languages/{wpcf7-fa_IR.mo → contact-form-7-fa_IR.mo} +0 -0
  35. languages/{wpcf7-fi.mo → contact-form-7-fi.mo} +0 -0
  36. languages/{wpcf7-fr_FR.mo → contact-form-7-fr_FR.mo} +0 -0
  37. languages/{wpcf7-ga_IE.mo → contact-form-7-ga_IE.mo} +0 -0
  38. languages/{wpcf7-gl_ES.mo → contact-form-7-gl_ES.mo} +0 -0
  39. languages/{wpcf7-gu_IN.mo → contact-form-7-gu_IN.mo} +0 -0
  40. languages/{wpcf7-he_IL.mo → contact-form-7-he_IL.mo} +0 -0
  41. languages/{wpcf7-hi_IN.mo → contact-form-7-hi_IN.mo} +0 -0
  42. languages/{wpcf7-hr.mo → contact-form-7-hr.mo} +0 -0
  43. languages/{wpcf7-hu_HU.mo → contact-form-7-hu_HU.mo} +0 -0
  44. languages/{wpcf7-hy_AM.mo → contact-form-7-hy_AM.mo} +0 -0
  45. languages/{wpcf7-id_ID.mo → contact-form-7-id_ID.mo} +0 -0
  46. languages/{wpcf7-it_IT.mo → contact-form-7-it_IT.mo} +0 -0
  47. languages/contact-form-7-ja.mo +0 -0
  48. languages/{wpcf7-ka_GE.mo → contact-form-7-ka_GE.mo} +0 -0
  49. languages/{wpcf7-ko_KR.mo → contact-form-7-ko_KR.mo} +0 -0
  50. languages/{wpcf7-lt_LT.mo → contact-form-7-lt_LT.mo} +0 -0
  51. languages/{wpcf7-lv.mo → contact-form-7-lv.mo} +0 -0
  52. languages/{wpcf7-mk_MK.mo → contact-form-7-mk_MK.mo} +0 -0
  53. languages/{wpcf7-ml_IN.mo → contact-form-7-ml_IN.mo} +0 -0
  54. languages/{wpcf7-ms_MY.mo → contact-form-7-ms_MY.mo} +0 -0
  55. languages/{wpcf7-mt_MT.mo → contact-form-7-mt_MT.mo} +0 -0
  56. languages/{wpcf7-nb_NO.mo → contact-form-7-nb_NO.mo} +0 -0
  57. languages/{wpcf7-nl_NL.mo → contact-form-7-nl_NL.mo} +0 -0
  58. languages/{wpcf7-pl_PL.mo → contact-form-7-pl_PL.mo} +0 -0
  59. languages/contact-form-7-pt_BR.mo +0 -0
  60. languages/{wpcf7-pt_PT.mo → contact-form-7-pt_PT.mo} +0 -0
  61. languages/{wpcf7-ro_RO.mo → contact-form-7-ro_RO.mo} +0 -0
  62. languages/{wpcf7-ru_RU.mo → contact-form-7-ru_RU.mo} +0 -0
  63. languages/{wpcf7-si_LK.mo → contact-form-7-si_LK.mo} +0 -0
  64. languages/{wpcf7-sk_SK.mo → contact-form-7-sk_SK.mo} +0 -0
  65. languages/{wpcf7-sl_SI.mo → contact-form-7-sl_SI.mo} +0 -0
  66. languages/{wpcf7-sq.mo → contact-form-7-sq.mo} +0 -0
  67. languages/{wpcf7-sr_RS.mo → contact-form-7-sr_RS.mo} +0 -0
  68. languages/{wpcf7-sv_SE.mo → contact-form-7-sv_SE.mo} +0 -0
  69. languages/{wpcf7-ta.mo → contact-form-7-ta.mo} +0 -0
  70. languages/{wpcf7-th.mo → contact-form-7-th.mo} +0 -0
  71. languages/{wpcf7-tl.mo → contact-form-7-tl.mo} +0 -0
  72. languages/{wpcf7-tr_TR.mo → contact-form-7-tr_TR.mo} +0 -0
  73. languages/{wpcf7-uk.mo → contact-form-7-uk.mo} +0 -0
  74. languages/{wpcf7-vi.mo → contact-form-7-vi.mo} +0 -0
  75. languages/{wpcf7-zh_CN.mo → contact-form-7-zh_CN.mo} +0 -0
  76. languages/{wpcf7-zh_TW.mo → contact-form-7-zh_TW.mo} +0 -0
  77. languages/{wpcf7.pot → contact-form-7.pot} +150 -66
  78. languages/wpcf7-ja.mo +0 -0
  79. languages/wpcf7-pt_BR.mo +0 -0
  80. modules/acceptance.php +11 -9
  81. modules/captcha.php +28 -26
  82. modules/checkbox.php +14 -14
  83. modules/date.php +21 -19
  84. modules/file.php +21 -19
  85. modules/flamingo.php +107 -20
  86. modules/jetpack.php +1 -1
  87. modules/number.php +22 -20
  88. modules/quiz.php +13 -12
  89. modules/select.php +14 -12
  90. modules/submit.php +7 -7
  91. modules/text.php +27 -25
  92. modules/textarea.php +15 -13
  93. readme.txt +21 -48
  94. settings.php +20 -135
  95. wp-contact-form-7.php +4 -8
admin/admin.php CHANGED
@@ -5,15 +5,33 @@ require_once WPCF7_PLUGIN_DIR . '/admin/admin-functions.php';
5
  add_action( 'admin_menu', 'wpcf7_admin_menu', 9 );
6
 
7
  function wpcf7_admin_menu() {
8
- add_object_page( __( 'Contact Form 7', 'wpcf7' ), __( 'Contact', 'wpcf7' ),
9
- 'wpcf7_read_contact_forms', 'wpcf7', 'wpcf7_admin_management_page',
10
- wpcf7_plugin_url( 'admin/images/menu-icon.png' ) );
11
 
12
- $contact_form_admin = add_submenu_page( 'wpcf7',
13
- __( 'Edit Contact Forms', 'wpcf7' ), __( 'Edit', 'wpcf7' ),
14
- 'wpcf7_read_contact_forms', 'wpcf7', 'wpcf7_admin_management_page' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
- add_action( 'load-' . $contact_form_admin, 'wpcf7_load_contact_form_admin' );
 
 
 
 
 
 
17
  }
18
 
19
  add_filter( 'set-screen-option', 'wpcf7_set_screen_options', 10, 3 );
@@ -29,7 +47,7 @@ function wpcf7_set_screen_options( $result, $option, $value ) {
29
  }
30
 
31
  function wpcf7_load_contact_form_admin() {
32
- global $wpcf7_contact_form;
33
 
34
  $action = wpcf7_current_action();
35
 
@@ -38,7 +56,7 @@ function wpcf7_load_contact_form_admin() {
38
  check_admin_referer( 'wpcf7-save-contact-form_' . $id );
39
 
40
  if ( ! current_user_can( 'wpcf7_edit_contact_form', $id ) )
41
- wp_die( __( 'You are not allowed to edit this item.', 'wpcf7' ) );
42
 
43
  if ( ! $contact_form = wpcf7_contact_form( $id ) ) {
44
  $contact_form = new WPCF7_ContactForm();
@@ -111,7 +129,7 @@ function wpcf7_load_contact_form_admin() {
111
  check_admin_referer( 'wpcf7-copy-contact-form_' . $id );
112
 
113
  if ( ! current_user_can( 'wpcf7_edit_contact_form', $id ) )
114
- wp_die( __( 'You are not allowed to edit this item.', 'wpcf7' ) );
115
 
116
  $query = array();
117
 
@@ -152,10 +170,10 @@ function wpcf7_load_contact_form_admin() {
152
  continue;
153
 
154
  if ( ! current_user_can( 'wpcf7_delete_contact_form', $post->id ) )
155
- wp_die( __( 'You are not allowed to delete this item.', 'wpcf7' ) );
156
 
157
  if ( ! $post->delete() )
158
- wp_die( __( 'Error in deleting.', 'wpcf7' ) );
159
 
160
  $deleted += 1;
161
  }
@@ -175,11 +193,12 @@ function wpcf7_load_contact_form_admin() {
175
 
176
  $post = null;
177
 
178
- if ( 'new' == $_GET['post'] && current_user_can( 'wpcf7_edit_contact_forms' ) )
179
- $post = wpcf7_get_contact_form_default_pack(
180
- array( 'locale' => ( isset( $_GET['locale'] ) ? $_GET['locale'] : '' ) ) );
181
- elseif ( ! empty( $_GET['post'] ) )
182
  $post = wpcf7_contact_form( $_GET['post'] );
 
183
 
184
  if ( $post && current_user_can( 'wpcf7_edit_contact_form', $post->id ) ) {
185
  wpcf7_add_meta_boxes( $post->id );
@@ -194,7 +213,7 @@ function wpcf7_load_contact_form_admin() {
194
  array( 'WPCF7_Contact_Form_List_Table', 'define_columns' ) );
195
 
196
  add_screen_option( 'per_page', array(
197
- 'label' => __( 'Contact Forms', 'wpcf7' ),
198
  'default' => 20,
199
  'option' => 'cfseven_contact_forms_per_page' ) );
200
  }
@@ -210,7 +229,7 @@ function wpcf7_admin_enqueue_scripts( $hook_suffix ) {
210
 
211
  wp_enqueue_style( 'contact-form-7-admin',
212
  wpcf7_plugin_url( 'admin/css/styles.css' ),
213
- array( 'thickbox' ), WPCF7_VERSION, 'all' );
214
 
215
  if ( wpcf7_is_rtl() ) {
216
  wp_enqueue_style( 'contact-form-7-admin-rtl',
@@ -224,14 +243,14 @@ function wpcf7_admin_enqueue_scripts( $hook_suffix ) {
224
 
225
  wp_enqueue_script( 'wpcf7-admin',
226
  wpcf7_plugin_url( 'admin/js/scripts.js' ),
227
- array( 'jquery', 'thickbox', 'postbox', 'wpcf7-admin-taggenerator' ),
228
  WPCF7_VERSION, true );
229
 
230
  $current_screen = get_current_screen();
231
 
232
  wp_localize_script( 'wpcf7-admin', '_wpcf7', array(
233
  'screenId' => $current_screen->id,
234
- 'generateTag' => __( 'Generate Tag', 'wpcf7' ),
235
  'pluginUrl' => wpcf7_plugin_url(),
236
  'tagGenerators' => wpcf7_tag_generators() ) );
237
  }
@@ -256,13 +275,13 @@ function wpcf7_admin_management_page() {
256
  <?php screen_icon(); ?>
257
 
258
  <h2><?php
259
- echo esc_html( __( 'Contact Form 7', 'wpcf7' ) );
260
 
261
- echo ' <a href="#TB_inline?height=300&width=400&inlineId=wpcf7-lang-select-modal" class="add-new-h2 thickbox">' . esc_html( __( 'Add New', 'wpcf7' ) ) . '</a>';
262
 
263
  if ( ! empty( $_REQUEST['s'] ) ) {
264
  echo sprintf( '<span class="subtitle">'
265
- . __( 'Search results for &#8220;%s&#8221;', 'wpcf7' )
266
  . '</span>', esc_html( $_REQUEST['s'] ) );
267
  }
268
  ?></h2>
@@ -271,62 +290,78 @@ function wpcf7_admin_management_page() {
271
 
272
  <form method="get" action="">
273
  <input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>" />
274
- <?php $list_table->search_box( __( 'Search Contact Forms', 'wpcf7' ), 'wpcf7-contact' ); ?>
275
  <?php $list_table->display(); ?>
276
  </form>
277
 
278
  </div>
279
  <?php
280
- wpcf7_admin_lang_select_modal();
281
  }
282
 
283
- function wpcf7_admin_lang_select_modal() {
 
 
 
 
 
 
 
 
 
 
 
284
  $available_locales = wpcf7_l10n();
285
  $default_locale = get_locale();
286
 
287
- if ( ! isset( $available_locales[$default_locale] ) )
288
  $default_locale = 'en_US';
 
289
 
290
  ?>
291
- <div id="wpcf7-lang-select-modal" class="hidden">
292
- <h4><?php echo esc_html( sprintf( __( 'Use the default language (%s)', 'wpcf7' ), $available_locales[$default_locale] ) ); ?></h4>
293
- <p><a href="<?php echo esc_url( add_query_arg( array( 'post' => 'new' ), menu_page_url( 'wpcf7', false ) ) ); ?>" class="button" /><?php echo esc_html( __( 'Add New', 'wpcf7' ) ); ?></a></p>
 
 
 
 
 
 
294
 
295
  <?php unset( $available_locales[$default_locale] ); ?>
296
- <h4><?php echo esc_html( __( 'Or', 'wpcf7' ) ); ?></h4>
297
  <form action="" method="get">
298
- <input type="hidden" name="page" value="wpcf7" />
299
- <input type="hidden" name="post" value="new" />
300
  <select name="locale">
301
- <option value="" selected="selected"><?php echo esc_html( __( '(select language)', 'wpcf7' ) ); ?></option>
302
  <?php foreach ( $available_locales as $code => $locale ) : ?>
303
  <option value="<?php echo esc_attr( $code ); ?>"><?php echo esc_html( $locale ); ?></option>
304
  <?php endforeach; ?>
305
  </select>
306
- <input type="submit" class="button" value="<?php echo esc_attr( __( 'Add New', 'wpcf7' ) ); ?>" />
307
  </form>
308
  </div>
309
  <?php
310
  }
311
 
312
  function wpcf7_add_meta_boxes( $post_id ) {
313
- add_meta_box( 'formdiv', __( 'Form', 'wpcf7' ),
314
  'wpcf7_form_meta_box', null, 'form', 'core' );
315
 
316
- add_meta_box( 'maildiv', __( 'Mail', 'wpcf7' ),
317
  'wpcf7_mail_meta_box', null, 'mail', 'core' );
318
 
319
- add_meta_box( 'mail2div', __( 'Mail (2)', 'wpcf7' ),
320
  'wpcf7_mail_meta_box', null, 'mail_2', 'core',
321
  array(
322
  'id' => 'wpcf7-mail-2',
323
  'name' => 'mail_2',
324
- 'use' => __( 'Use mail (2)', 'wpcf7' ) ) );
325
 
326
- add_meta_box( 'messagesdiv', __( 'Messages', 'wpcf7' ),
327
  'wpcf7_messages_meta_box', null, 'messages', 'core' );
328
 
329
- add_meta_box( 'additionalsettingsdiv', __( 'Additional Settings', 'wpcf7' ),
330
  'wpcf7_additional_settings_meta_box', null, 'additional_settings', 'core' );
331
 
332
  do_action( 'wpcf7_add_meta_boxes', $post_id );
@@ -357,11 +392,11 @@ function wpcf7_admin_updated_message() {
357
  return;
358
 
359
  if ( 'created' == $_REQUEST['message'] )
360
- $updated_message = esc_html( __( 'Contact form created.', 'wpcf7' ) );
361
  elseif ( 'saved' == $_REQUEST['message'] )
362
- $updated_message = esc_html( __( 'Contact form saved.', 'wpcf7' ) );
363
  elseif ( 'deleted' == $_REQUEST['message'] )
364
- $updated_message = esc_html( __( 'Contact form deleted.', 'wpcf7' ) );
365
 
366
  if ( empty( $updated_message ) )
367
  return;
@@ -378,7 +413,7 @@ function wpcf7_plugin_action_links( $links, $file ) {
378
  return $links;
379
 
380
  $settings_link = '<a href="' . menu_page_url( 'wpcf7', false ) . '">'
381
- . esc_html( __( 'Settings', 'wpcf7' ) ) . '</a>';
382
 
383
  array_unshift( $links, $settings_link );
384
 
@@ -389,72 +424,116 @@ add_action( 'wpcf7_admin_notices', 'wpcf7_cf7com_links', 9 );
389
 
390
  function wpcf7_cf7com_links() {
391
  $links = '<div class="cf7com-links">'
392
- . '<a href="' . esc_url_raw( __( 'http://contactform7.com/docs/', 'wpcf7' ) ) . '" target="_blank">'
393
- . esc_html( __( 'Docs', 'wpcf7' ) ) . '</a> - '
394
- . '<a href="' . esc_url_raw( __( 'http://contactform7.com/faq/', 'wpcf7' ) ) . '" target="_blank">'
395
- . esc_html( __( 'FAQ', 'wpcf7' ) ) . '</a> - '
396
- . '<a href="' . esc_url_raw( __( 'http://contactform7.com/support/', 'wpcf7' ) ) . '" target="_blank">'
397
- . esc_html( __( 'Support', 'wpcf7' ) ) . '</a>'
 
 
398
  . '</div>';
399
 
400
  echo apply_filters( 'wpcf7_cf7com_links', $links );
401
  }
402
 
403
- add_action( 'wpcf7_admin_notices', 'wpcf7_donation_link' );
404
 
405
- function wpcf7_donation_link() {
406
- if ( ! WPCF7_SHOW_DONATION_LINK )
407
- return;
408
 
409
- if ( ! empty( $_REQUEST['post'] ) && 'new' == $_REQUEST['post'] )
410
  return;
 
411
 
412
- if ( ! empty( $_REQUEST['message'] ) )
413
- return;
414
 
415
- $show_link = true;
 
416
 
417
- $num = mt_rand( 0, 99 );
 
 
 
 
 
418
 
419
- if ( $num >= 20 )
420
- $show_link = false;
421
 
422
- $show_link = apply_filters( 'wpcf7_show_donation_link', $show_link );
 
423
 
424
- if ( ! $show_link )
425
  return;
 
426
 
427
- $texts = array(
428
- __( "Contact Form 7 needs your support. Please donate today.", 'wpcf7' ),
429
- __( "Your contribution is needed for making this plugin better.", 'wpcf7' ) );
430
 
431
- $text = $texts[array_rand( $texts )];
 
432
 
 
 
 
433
  ?>
434
- <div class="donation">
435
- <p><a href="<?php echo esc_url_raw( __( 'http://contactform7.com/donate/', 'wpcf7' ) ); ?>"><?php echo esc_html( $text ); ?></a> <a href="<?php echo esc_url_raw( __( 'http://contactform7.com/donate/', 'wpcf7' ) ); ?>" class="button"><?php echo esc_html( __( "Donate", 'wpcf7' ) ); ?></a></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
436
  </div>
437
  <?php
438
  }
439
 
440
- add_action( 'admin_notices', 'wpcf7_old_wp_version_error', 9 );
441
 
442
- function wpcf7_old_wp_version_error() {
443
- global $plugin_page;
444
 
445
- if ( 'wpcf7' != $plugin_page )
446
- return;
447
 
448
- $wp_version = get_bloginfo( 'version' );
 
 
449
 
450
- if ( ! version_compare( $wp_version, WPCF7_REQUIRED_WP_VERSION, '<' ) )
451
- return;
 
452
 
453
- ?>
454
- <div class="error">
455
- <p><?php echo sprintf( __( '<strong>Contact Form 7 %1$s requires WordPress %2$s or higher.</strong> Please <a href="%3$s">update WordPress</a> first.', 'wpcf7' ), WPCF7_VERSION, WPCF7_REQUIRED_WP_VERSION, admin_url( 'update-core.php' ) ); ?></p>
456
- </div>
457
- <?php
458
  }
459
 
460
  ?>
5
  add_action( 'admin_menu', 'wpcf7_admin_menu', 9 );
6
 
7
  function wpcf7_admin_menu() {
8
+ $icon_url = wpcf7_plugin_url( 'admin/images/menu-icon.png' );
 
 
9
 
10
+ if ( defined( 'MP6' ) && MP6
11
+ || version_compare( get_bloginfo( 'version' ), '3.8-dev', '>=' ) ) {
12
+ $icon_url = '';
13
+ }
14
+
15
+ add_object_page( __( 'Contact Form 7', 'contact-form-7' ),
16
+ __( 'Contact', 'contact-form-7' ),
17
+ 'wpcf7_read_contact_forms', 'wpcf7',
18
+ 'wpcf7_admin_management_page', $icon_url );
19
+
20
+ $edit = add_submenu_page( 'wpcf7',
21
+ __( 'Edit Contact Form', 'contact-form-7' ),
22
+ __( 'Contact Forms', 'contact-form-7' ),
23
+ 'wpcf7_read_contact_forms', 'wpcf7',
24
+ 'wpcf7_admin_management_page' );
25
+
26
+ add_action( 'load-' . $edit, 'wpcf7_load_contact_form_admin' );
27
 
28
+ $addnew = add_submenu_page( 'wpcf7',
29
+ __( 'Add New Contact Form', 'contact-form-7' ),
30
+ __( 'Add New', 'contact-form-7' ),
31
+ 'wpcf7_edit_contact_forms', 'wpcf7-new',
32
+ 'wpcf7_admin_add_new_page' );
33
+
34
+ add_action( 'load-' . $addnew, 'wpcf7_load_contact_form_admin' );
35
  }
36
 
37
  add_filter( 'set-screen-option', 'wpcf7_set_screen_options', 10, 3 );
47
  }
48
 
49
  function wpcf7_load_contact_form_admin() {
50
+ global $wpcf7_contact_form, $plugin_page;
51
 
52
  $action = wpcf7_current_action();
53
 
56
  check_admin_referer( 'wpcf7-save-contact-form_' . $id );
57
 
58
  if ( ! current_user_can( 'wpcf7_edit_contact_form', $id ) )
59
+ wp_die( __( 'You are not allowed to edit this item.', 'contact-form-7' ) );
60
 
61
  if ( ! $contact_form = wpcf7_contact_form( $id ) ) {
62
  $contact_form = new WPCF7_ContactForm();
129
  check_admin_referer( 'wpcf7-copy-contact-form_' . $id );
130
 
131
  if ( ! current_user_can( 'wpcf7_edit_contact_form', $id ) )
132
+ wp_die( __( 'You are not allowed to edit this item.', 'contact-form-7' ) );
133
 
134
  $query = array();
135
 
170
  continue;
171
 
172
  if ( ! current_user_can( 'wpcf7_delete_contact_form', $post->id ) )
173
+ wp_die( __( 'You are not allowed to delete this item.', 'contact-form-7' ) );
174
 
175
  if ( ! $post->delete() )
176
+ wp_die( __( 'Error in deleting.', 'contact-form-7' ) );
177
 
178
  $deleted += 1;
179
  }
193
 
194
  $post = null;
195
 
196
+ if ( 'wpcf7-new' == $plugin_page && isset( $_GET['locale'] ) ) {
197
+ $post = wpcf7_get_contact_form_default_pack( array(
198
+ 'locale' => $_GET['locale'] ) );
199
+ } elseif ( ! empty( $_GET['post'] ) ) {
200
  $post = wpcf7_contact_form( $_GET['post'] );
201
+ }
202
 
203
  if ( $post && current_user_can( 'wpcf7_edit_contact_form', $post->id ) ) {
204
  wpcf7_add_meta_boxes( $post->id );
213
  array( 'WPCF7_Contact_Form_List_Table', 'define_columns' ) );
214
 
215
  add_screen_option( 'per_page', array(
216
+ 'label' => __( 'Contact Forms', 'contact-form-7' ),
217
  'default' => 20,
218
  'option' => 'cfseven_contact_forms_per_page' ) );
219
  }
229
 
230
  wp_enqueue_style( 'contact-form-7-admin',
231
  wpcf7_plugin_url( 'admin/css/styles.css' ),
232
+ array(), WPCF7_VERSION, 'all' );
233
 
234
  if ( wpcf7_is_rtl() ) {
235
  wp_enqueue_style( 'contact-form-7-admin-rtl',
243
 
244
  wp_enqueue_script( 'wpcf7-admin',
245
  wpcf7_plugin_url( 'admin/js/scripts.js' ),
246
+ array( 'jquery', 'postbox', 'wpcf7-admin-taggenerator' ),
247
  WPCF7_VERSION, true );
248
 
249
  $current_screen = get_current_screen();
250
 
251
  wp_localize_script( 'wpcf7-admin', '_wpcf7', array(
252
  'screenId' => $current_screen->id,
253
+ 'generateTag' => __( 'Generate Tag', 'contact-form-7' ),
254
  'pluginUrl' => wpcf7_plugin_url(),
255
  'tagGenerators' => wpcf7_tag_generators() ) );
256
  }
275
  <?php screen_icon(); ?>
276
 
277
  <h2><?php
278
+ echo esc_html( __( 'Contact Forms', 'contact-form-7' ) );
279
 
280
+ echo ' <a href="' . esc_url( menu_page_url( 'wpcf7-new', false ) ) . '" class="add-new-h2">' . esc_html( __( 'Add New', 'contact-form-7' ) ) . '</a>';
281
 
282
  if ( ! empty( $_REQUEST['s'] ) ) {
283
  echo sprintf( '<span class="subtitle">'
284
+ . __( 'Search results for &#8220;%s&#8221;', 'contact-form-7' )
285
  . '</span>', esc_html( $_REQUEST['s'] ) );
286
  }
287
  ?></h2>
290
 
291
  <form method="get" action="">
292
  <input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>" />
293
+ <?php $list_table->search_box( __( 'Search Contact Forms', 'contact-form-7' ), 'wpcf7-contact' ); ?>
294
  <?php $list_table->display(); ?>
295
  </form>
296
 
297
  </div>
298
  <?php
 
299
  }
300
 
301
+ function wpcf7_admin_add_new_page() {
302
+ global $wpcf7_contact_form;
303
+
304
+ if ( $wpcf7_contact_form ) {
305
+ $post =& $wpcf7_contact_form;
306
+ $post_id = -1;
307
+
308
+ require_once WPCF7_PLUGIN_DIR . '/admin/includes/meta-boxes.php';
309
+ require_once WPCF7_PLUGIN_DIR . '/admin/edit-contact-form.php';
310
+ return;
311
+ }
312
+
313
  $available_locales = wpcf7_l10n();
314
  $default_locale = get_locale();
315
 
316
+ if ( ! isset( $available_locales[$default_locale] ) ) {
317
  $default_locale = 'en_US';
318
+ }
319
 
320
  ?>
321
+ <div class="wrap">
322
+ <?php screen_icon(); ?>
323
+
324
+ <h2><?php echo esc_html( __( 'Add New Contact Form', 'contact-form-7' ) ); ?></h2>
325
+
326
+ <?php do_action( 'wpcf7_admin_notices' ); ?>
327
+
328
+ <h3><?php echo esc_html( sprintf( __( 'Use the default language (%s)', 'contact-form-7' ), $available_locales[$default_locale] ) ); ?></h3>
329
+ <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>
330
 
331
  <?php unset( $available_locales[$default_locale] ); ?>
332
+ <h3><?php echo esc_html( __( 'Or', 'contact-form-7' ) ); ?></h3>
333
  <form action="" method="get">
334
+ <input type="hidden" name="page" value="wpcf7-new" />
 
335
  <select name="locale">
336
+ <option value="" selected="selected"><?php echo esc_html( __( '(select language)', 'contact-form-7' ) ); ?></option>
337
  <?php foreach ( $available_locales as $code => $locale ) : ?>
338
  <option value="<?php echo esc_attr( $code ); ?>"><?php echo esc_html( $locale ); ?></option>
339
  <?php endforeach; ?>
340
  </select>
341
+ <input type="submit" class="button" value="<?php echo esc_attr( __( 'Add New', 'contact-form-7' ) ); ?>" />
342
  </form>
343
  </div>
344
  <?php
345
  }
346
 
347
  function wpcf7_add_meta_boxes( $post_id ) {
348
+ add_meta_box( 'formdiv', __( 'Form', 'contact-form-7' ),
349
  'wpcf7_form_meta_box', null, 'form', 'core' );
350
 
351
+ add_meta_box( 'maildiv', __( 'Mail', 'contact-form-7' ),
352
  'wpcf7_mail_meta_box', null, 'mail', 'core' );
353
 
354
+ add_meta_box( 'mail2div', __( 'Mail (2)', 'contact-form-7' ),
355
  'wpcf7_mail_meta_box', null, 'mail_2', 'core',
356
  array(
357
  'id' => 'wpcf7-mail-2',
358
  'name' => 'mail_2',
359
+ 'use' => __( 'Use mail (2)', 'contact-form-7' ) ) );
360
 
361
+ add_meta_box( 'messagesdiv', __( 'Messages', 'contact-form-7' ),
362
  'wpcf7_messages_meta_box', null, 'messages', 'core' );
363
 
364
+ add_meta_box( 'additionalsettingsdiv', __( 'Additional Settings', 'contact-form-7' ),
365
  'wpcf7_additional_settings_meta_box', null, 'additional_settings', 'core' );
366
 
367
  do_action( 'wpcf7_add_meta_boxes', $post_id );
392
  return;
393
 
394
  if ( 'created' == $_REQUEST['message'] )
395
+ $updated_message = esc_html( __( 'Contact form created.', 'contact-form-7' ) );
396
  elseif ( 'saved' == $_REQUEST['message'] )
397
+ $updated_message = esc_html( __( 'Contact form saved.', 'contact-form-7' ) );
398
  elseif ( 'deleted' == $_REQUEST['message'] )
399
+ $updated_message = esc_html( __( 'Contact form deleted.', 'contact-form-7' ) );
400
 
401
  if ( empty( $updated_message ) )
402
  return;
413
  return $links;
414
 
415
  $settings_link = '<a href="' . menu_page_url( 'wpcf7', false ) . '">'
416
+ . esc_html( __( 'Settings', 'contact-form-7' ) ) . '</a>';
417
 
418
  array_unshift( $links, $settings_link );
419
 
424
 
425
  function wpcf7_cf7com_links() {
426
  $links = '<div class="cf7com-links">'
427
+ . '<a href="' . esc_url_raw( __( 'http://contactform7.com/docs/', 'contact-form-7' ) ) . '" target="_blank">'
428
+ . esc_html( __( 'Docs', 'contact-form-7' ) ) . '</a> - '
429
+ . '<a href="' . esc_url_raw( __( 'http://contactform7.com/faq/', 'contact-form-7' ) ) . '" target="_blank">'
430
+ . esc_html( __( 'FAQ', 'contact-form-7' ) ) . '</a> - '
431
+ . '<a href="' . esc_url_raw( __( 'http://contactform7.com/support/', 'contact-form-7' ) ) . '" target="_blank">'
432
+ . esc_html( __( 'Support', 'contact-form-7' ) ) . '</a> - '
433
+ . '<a href="' . esc_url_raw( __( 'http://contactform7.com/donate/', 'contact-form-7' ) ) . '" target="_blank">'
434
+ . esc_html( __( 'Donate', 'contact-form-7' ) ) . '</a>'
435
  . '</div>';
436
 
437
  echo apply_filters( 'wpcf7_cf7com_links', $links );
438
  }
439
 
440
+ add_action( 'admin_notices', 'wpcf7_old_wp_version_error', 9 );
441
 
442
+ function wpcf7_old_wp_version_error() {
443
+ global $plugin_page;
 
444
 
445
+ if ( 'wpcf7' != substr( $plugin_page, 0, 5 ) ) {
446
  return;
447
+ }
448
 
449
+ $wp_version = get_bloginfo( 'version' );
 
450
 
451
+ if ( ! version_compare( $wp_version, WPCF7_REQUIRED_WP_VERSION, '<' ) )
452
+ return;
453
 
454
+ ?>
455
+ <div class="error">
456
+ <p><?php echo sprintf( __( '<strong>Contact Form 7 %1$s requires WordPress %2$s or higher.</strong> Please <a href="%3$s">update WordPress</a> first.', 'contact-form-7' ), WPCF7_VERSION, WPCF7_REQUIRED_WP_VERSION, admin_url( 'update-core.php' ) ); ?></p>
457
+ </div>
458
+ <?php
459
+ }
460
 
461
+ add_action( 'wpcf7_admin_notices', 'wpcf7_welcome_panel', 2 );
 
462
 
463
+ function wpcf7_welcome_panel() {
464
+ global $plugin_page;
465
 
466
+ if ( 'wpcf7' != $plugin_page || ! empty( $_GET['post'] ) ) {
467
  return;
468
+ }
469
 
470
+ $classes = 'welcome-panel';
 
 
471
 
472
+ $vers = (array) get_user_meta( get_current_user_id(),
473
+ 'wpcf7_hide_welcome_panel_on', true );
474
 
475
+ if ( in_array( WPCF7_VERSION, $vers ) ) {
476
+ $classes .= ' hidden';
477
+ }
478
  ?>
479
+ <div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
480
+ <?php wp_nonce_field( 'wpcf7-welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
481
+ <a class="welcome-panel-close" href="<?php echo esc_url( menu_page_url( 'wpcf7', false ) ); ?>"><?php echo esc_html( __( 'Dismiss', 'contact-form-7' ) ); ?></a>
482
+
483
+ <div class="welcome-panel-content">
484
+ <div class="welcome-panel-column-container">
485
+ <div class="welcome-panel-column">
486
+ <h4><?php echo esc_html( __( 'Contact Form 7 Needs Your Support', 'contact-form-7' ) ); ?></h4>
487
+ <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>
488
+ <p><a href="<?php echo esc_url_raw( __( 'http://contactform7.com/donate/', 'contact-form-7' ) ); ?>" class="button button-primary" target="_blank"><?php echo esc_html( __( 'Donate', 'contact-form-7' ) ); ?></a></p>
489
+ </div>
490
+
491
+ <div class="welcome-panel-column">
492
+ <h4><?php echo esc_html( __( 'Get Started', 'contact-form-7' ) ); ?></h4>
493
+ <ul>
494
+ <li><a href="<?php echo esc_url_raw( __( 'http://contactform7.com/getting-started-with-contact-form-7/', 'contact-form-7' ) ); ?>" target="_blank"><?php echo esc_html( __( "Getting Started with Contact Form 7", 'contact-form-7' ) ); ?></a></li>
495
+ <li><a href="<?php echo esc_url_raw( __( 'http://contactform7.com/admin-screen/', 'contact-form-7' ) ); ?>" target="_blank"><?php echo esc_html( __( "Admin Screen", 'contact-form-7' ) ); ?></a></li>
496
+ <li><a href="<?php echo esc_url_raw( __( 'http://contactform7.com/tag-syntax/', 'contact-form-7' ) ); ?>" target="_blank"><?php echo esc_html( __( "How Tags Work", 'contact-form-7' ) ); ?></a></li>
497
+ <li><a href="<?php echo esc_url_raw( __( 'http://contactform7.com/setting-up-mail/', 'contact-form-7' ) ); ?>" target="_blank"><?php echo esc_html( __( "Setting Up Mail", 'contact-form-7' ) ); ?></a></li>
498
+ </ul>
499
+ </div>
500
+
501
+ <div class="welcome-panel-column">
502
+ <h4><?php echo esc_html( __( 'Did You Know?', 'contact-form-7' ) ); ?></h4>
503
+ <ul>
504
+ <li><a href="<?php echo esc_url_raw( __( 'http://contactform7.com/spam-filtering-with-akismet/', 'contact-form-7' ) ); ?>" target="_blank"><?php echo esc_html( __( "Spam Filtering with Akismet", 'contact-form-7' ) ); ?></a></li>
505
+ <li><a href="<?php echo esc_url_raw( __( 'http://contactform7.com/save-submitted-messages-with-flamingo/', 'contact-form-7' ) ); ?>" target="_blank"><?php echo esc_html( __( "Save Messages with Flamingo", 'contact-form-7' ) ); ?></a></li>
506
+ <li><a href="<?php echo esc_url_raw( __( 'http://contactform7.com/selectable-recipient-with-pipes/', 'contact-form-7' ) ); ?>" target="_blank"><?php echo esc_html( __( "Selectable Recipient with Pipes", 'contact-form-7' ) ); ?></a></li>
507
+ <li><a href="<?php echo esc_url_raw( __( 'http://contactform7.com/tracking-form-submissions-with-google-analytics/', 'contact-form-7' ) ); ?>" target="_blank"><?php echo esc_html( __( "Tracking with Google Analytics", 'contact-form-7' ) ); ?></a></li>
508
+ </ul>
509
+ </div>
510
+ </div>
511
+ </div>
512
  </div>
513
  <?php
514
  }
515
 
516
+ add_action( 'wp_ajax_wpcf7-update-welcome-panel', 'wpcf7_admin_ajax_welcome_panel' );
517
 
518
+ function wpcf7_admin_ajax_welcome_panel() {
519
+ check_ajax_referer( 'wpcf7-welcome-panel-nonce', 'welcomepanelnonce' );
520
 
521
+ $vers = get_user_meta( get_current_user_id(),
522
+ 'wpcf7_hide_welcome_panel_on', true );
523
 
524
+ if ( empty( $vers ) || ! is_array( $vers ) ) {
525
+ $vers = array();
526
+ }
527
 
528
+ if ( empty( $_POST['visible'] ) ) {
529
+ $vers[] = WPCF7_VERSION;
530
+ }
531
 
532
+ $vers = array_unique( $vers );
533
+
534
+ update_user_meta( get_current_user_id(), 'wpcf7_hide_welcome_panel_on', $vers );
535
+
536
+ wp_die( 1 );
537
  }
538
 
539
  ?>
admin/css/styles.css CHANGED
@@ -5,7 +5,7 @@
5
  div.wrap div.cf7com-links {
6
  text-align: right;
7
  font-size: .9em;
8
- margin: -2em 1em 1em 0;
9
  }
10
 
11
  div.wrap div.cf7com-links a {
@@ -46,6 +46,7 @@ div.wrap div.donation p a.button {
46
  position: relative;
47
  border: 1px solid #c7c7c7;
48
  padding: 6px;
 
49
  }
50
 
51
  div.save-contact-form {
@@ -84,14 +85,16 @@ input#wpcf7-title {
84
  font: bold 20px serif;
85
  cursor: pointer;
86
  background-color: transparent;
 
87
  }
88
 
89
  input#wpcf7-title.focus {
90
  color: #333;
91
- border: 1px solid #777;
92
  font: normal 13px Verdana, Arial, Helvetica, sans-serif;
93
  cursor: text;
94
  background-color: transparent;
 
95
  }
96
 
97
  input#wpcf7-title.mouseover {
@@ -264,4 +267,18 @@ div.tg-panetitle {
264
  input.shortcode-in-list-table {
265
  width: 100%;
266
  border: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  }
5
  div.wrap div.cf7com-links {
6
  text-align: right;
7
  font-size: .9em;
8
+ margin: -20px 1em 1em 0;
9
  }
10
 
11
  div.wrap div.cf7com-links a {
46
  position: relative;
47
  border: 1px solid #c7c7c7;
48
  padding: 6px;
49
+ background-color: #fff;
50
  }
51
 
52
  div.save-contact-form {
85
  font: bold 20px serif;
86
  cursor: pointer;
87
  background-color: transparent;
88
+ box-shadow: none;
89
  }
90
 
91
  input#wpcf7-title.focus {
92
  color: #333;
93
+ border: 1px solid #aaa;
94
  font: normal 13px Verdana, Arial, Helvetica, sans-serif;
95
  cursor: text;
96
  background-color: transparent;
97
+ box-shadow: inset 0 1px 2px rgba(0,0,0,0.07);
98
  }
99
 
100
  input#wpcf7-title.mouseover {
267
  input.shortcode-in-list-table {
268
  width: 100%;
269
  border: none;
270
+ }
271
+
272
+ /* welcome panel */
273
+ .welcome-panel p.message {
274
+ line-height: 1.4em;
275
+ margin-right: 25px;
276
+ }
277
+
278
+ .welcome-panel li {
279
+ margin-bottom: 12px;
280
+ }
281
+
282
+ .welcome-panel-close {
283
+ z-index: 2;
284
  }
admin/edit-contact-form.php CHANGED
@@ -9,10 +9,12 @@ if ( ! defined( 'ABSPATH' ) )
9
  <?php screen_icon(); ?>
10
 
11
  <h2><?php
12
- echo esc_html( __( 'Contact Form 7', 'wpcf7' ) );
 
 
 
13
 
14
- if ( ! $post->initial ) {
15
- echo ' <a href="#TB_inline?height=300&width=400&inlineId=wpcf7-lang-select-modal" class="add-new-h2 thickbox">' . esc_html( __( 'Add New', 'wpcf7' ) ) . '</a>';
16
  }
17
  ?></h2>
18
 
@@ -44,13 +46,13 @@ if ( $post ) :
44
 
45
  <?php if ( ! $post->initial ) : ?>
46
  <p class="tagcode">
47
- <?php echo esc_html( __( "Copy this code and paste it into your post, page or text widget content.", 'wpcf7' ) ); ?><br />
48
 
49
  <input type="text" id="contact-form-anchor-text" onfocus="this.select();" readonly="readonly" />
50
  </p>
51
 
52
  <p class="tagcode" style="display: none;">
53
- <?php echo esc_html( __( "Old code is also available.", 'wpcf7' ) ); ?><br />
54
 
55
  <input type="text" id="contact-form-anchor-text-old" onfocus="this.select();" readonly="readonly" />
56
  </p>
@@ -58,21 +60,21 @@ if ( $post ) :
58
 
59
  <?php if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) : ?>
60
  <div class="save-contact-form">
61
- <input type="submit" class="button-primary" name="wpcf7-save" value="<?php echo esc_attr( __( 'Save', 'wpcf7' ) ); ?>" />
62
  </div>
63
  <?php endif; ?>
64
 
65
  <?php if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) && ! $post->initial ) : ?>
66
  <div class="actions-link">
67
  <?php $copy_nonce = wp_create_nonce( 'wpcf7-copy-contact-form_' . $post_id ); ?>
68
- <input type="submit" name="wpcf7-copy" class="copy" value="<?php echo esc_attr( __( 'Duplicate', 'wpcf7' ) ); ?>"
69
  <?php echo "onclick=\"this.form._wpnonce.value = '$copy_nonce'; this.form.action.value = 'copy'; return true;\""; ?> />
70
  |
71
 
72
  <?php $delete_nonce = wp_create_nonce( 'wpcf7-delete-contact-form_' . $post_id ); ?>
73
- <input type="submit" name="wpcf7-delete" class="delete" value="<?php echo esc_attr( __( 'Delete', 'wpcf7' ) ); ?>"
74
  <?php echo "onclick=\"if (confirm('" .
75
- esc_js( __( "You are about to delete this contact form.\n 'Cancel' to stop, 'OK' to delete.", 'wpcf7' ) ) .
76
  "')) {this.form._wpnonce.value = '$delete_nonce'; this.form.action.value = 'delete'; return true;} return false;\""; ?> />
77
  </div>
78
  <?php endif; ?>
@@ -114,6 +116,4 @@ wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
114
 
115
  </div>
116
 
117
- <?php wpcf7_admin_lang_select_modal(); ?>
118
-
119
  <?php do_action_ref_array( 'wpcf7_admin_footer', array( &$post ) ); ?>
9
  <?php screen_icon(); ?>
10
 
11
  <h2><?php
12
+ if ( $post->initial ) {
13
+ echo esc_html( __( 'Add New Contact Form', 'contact-form-7' ) );
14
+ } else {
15
+ echo esc_html( __( 'Edit Contact Form', 'contact-form-7' ) );
16
 
17
+ echo ' <a href="' . esc_url( menu_page_url( 'wpcf7-new', false ) ) . '" class="add-new-h2">' . esc_html( __( 'Add New', 'contact-form-7' ) ) . '</a>';
 
18
  }
19
  ?></h2>
20
 
46
 
47
  <?php if ( ! $post->initial ) : ?>
48
  <p class="tagcode">
49
+ <?php echo esc_html( __( "Copy this code and paste it into your post, page or text widget content.", 'contact-form-7' ) ); ?><br />
50
 
51
  <input type="text" id="contact-form-anchor-text" onfocus="this.select();" readonly="readonly" />
52
  </p>
53
 
54
  <p class="tagcode" style="display: none;">
55
+ <?php echo esc_html( __( "Old code is also available.", 'contact-form-7' ) ); ?><br />
56
 
57
  <input type="text" id="contact-form-anchor-text-old" onfocus="this.select();" readonly="readonly" />
58
  </p>
60
 
61
  <?php if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) : ?>
62
  <div class="save-contact-form">
63
+ <input type="submit" class="button-primary" name="wpcf7-save" value="<?php echo esc_attr( __( 'Save', 'contact-form-7' ) ); ?>" />
64
  </div>
65
  <?php endif; ?>
66
 
67
  <?php if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) && ! $post->initial ) : ?>
68
  <div class="actions-link">
69
  <?php $copy_nonce = wp_create_nonce( 'wpcf7-copy-contact-form_' . $post_id ); ?>
70
+ <input type="submit" name="wpcf7-copy" class="copy" value="<?php echo esc_attr( __( 'Duplicate', 'contact-form-7' ) ); ?>"
71
  <?php echo "onclick=\"this.form._wpnonce.value = '$copy_nonce'; this.form.action.value = 'copy'; return true;\""; ?> />
72
  |
73
 
74
  <?php $delete_nonce = wp_create_nonce( 'wpcf7-delete-contact-form_' . $post_id ); ?>
75
+ <input type="submit" name="wpcf7-delete" class="delete" value="<?php echo esc_attr( __( 'Delete', 'contact-form-7' ) ); ?>"
76
  <?php echo "onclick=\"if (confirm('" .
77
+ esc_js( __( "You are about to delete this contact form.\n 'Cancel' to stop, 'OK' to delete.", 'contact-form-7' ) ) .
78
  "')) {this.form._wpnonce.value = '$delete_nonce'; this.form.action.value = 'delete'; return true;} return false;\""; ?> />
79
  </div>
80
  <?php endif; ?>
116
 
117
  </div>
118
 
 
 
119
  <?php do_action_ref_array( 'wpcf7_admin_footer', array( &$post ) ); ?>
admin/includes/class-contact-forms-list-table.php CHANGED
@@ -8,10 +8,10 @@ class WPCF7_Contact_Form_List_Table extends WP_List_Table {
8
  public static function define_columns() {
9
  $columns = array(
10
  'cb' => '<input type="checkbox" />',
11
- 'title' => __( 'Title', 'wpcf7' ),
12
- 'shortcode' => __( 'Shortcode', 'wpcf7' ),
13
- 'author' => __( 'Author', 'wpcf7' ),
14
- 'date' => __( 'Date', 'wpcf7' ) );
15
 
16
  return $columns;
17
  }
@@ -80,7 +80,7 @@ class WPCF7_Contact_Form_List_Table extends WP_List_Table {
80
 
81
  function get_bulk_actions() {
82
  $actions = array(
83
- 'delete' => __( 'Delete', 'wpcf7' ) );
84
 
85
  return $actions;
86
  }
@@ -101,7 +101,7 @@ class WPCF7_Contact_Form_List_Table extends WP_List_Table {
101
  $edit_link = add_query_arg( array( 'action' => 'edit' ), $url );
102
 
103
  $actions = array(
104
- 'edit' => '<a href="' . $edit_link . '">' . __( 'Edit', 'wpcf7' ) . '</a>' );
105
 
106
  if ( current_user_can( 'wpcf7_edit_contact_form', $item->id ) ) {
107
  $copy_link = wp_nonce_url(
@@ -109,12 +109,12 @@ class WPCF7_Contact_Form_List_Table extends WP_List_Table {
109
  'wpcf7-copy-contact-form_' . absint( $item->id ) );
110
 
111
  $actions = array_merge( $actions, array(
112
- 'copy' => '<a href="' . $copy_link . '">' . __( 'Copy', 'wpcf7' ) . '</a>' ) );
113
  }
114
 
115
  $a = sprintf( '<a class="row-title" href="%1$s" title="%2$s">%3$s</a>',
116
  $edit_link,
117
- esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;', 'wpcf7' ), $item->title ) ),
118
  esc_html( $item->title ) );
119
 
120
  return '<strong>' . $a . '</strong> ' . $this->row_actions( $actions );
@@ -151,16 +151,16 @@ class WPCF7_Contact_Form_List_Table extends WP_List_Table {
151
  if ( ! $post )
152
  return;
153
 
154
- $t_time = mysql2date( __( 'Y/m/d g:i:s A', 'wpcf7' ), $post->post_date, true );
155
  $m_time = $post->post_date;
156
  $time = mysql2date( 'G', $post->post_date ) - get_option( 'gmt_offset' ) * 3600;
157
 
158
  $time_diff = time() - $time;
159
 
160
  if ( $time_diff > 0 && $time_diff < 24*60*60 )
161
- $h_time = sprintf( __( '%s ago', 'wpcf7' ), human_time_diff( $time ) );
162
  else
163
- $h_time = mysql2date( __( 'Y/m/d', 'wpcf7' ), $m_time );
164
 
165
  return '<abbr title="' . $t_time . '">' . $h_time . '</abbr>';
166
  }
8
  public static function define_columns() {
9
  $columns = array(
10
  'cb' => '<input type="checkbox" />',
11
+ 'title' => __( 'Title', 'contact-form-7' ),
12
+ 'shortcode' => __( 'Shortcode', 'contact-form-7' ),
13
+ 'author' => __( 'Author', 'contact-form-7' ),
14
+ 'date' => __( 'Date', 'contact-form-7' ) );
15
 
16
  return $columns;
17
  }
80
 
81
  function get_bulk_actions() {
82
  $actions = array(
83
+ 'delete' => __( 'Delete', 'contact-form-7' ) );
84
 
85
  return $actions;
86
  }
101
  $edit_link = add_query_arg( array( 'action' => 'edit' ), $url );
102
 
103
  $actions = array(
104
+ 'edit' => '<a href="' . $edit_link . '">' . __( 'Edit', 'contact-form-7' ) . '</a>' );
105
 
106
  if ( current_user_can( 'wpcf7_edit_contact_form', $item->id ) ) {
107
  $copy_link = wp_nonce_url(
109
  'wpcf7-copy-contact-form_' . absint( $item->id ) );
110
 
111
  $actions = array_merge( $actions, array(
112
+ 'copy' => '<a href="' . $copy_link . '">' . __( 'Copy', 'contact-form-7' ) . '</a>' ) );
113
  }
114
 
115
  $a = sprintf( '<a class="row-title" href="%1$s" title="%2$s">%3$s</a>',
116
  $edit_link,
117
+ esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;', 'contact-form-7' ), $item->title ) ),
118
  esc_html( $item->title ) );
119
 
120
  return '<strong>' . $a . '</strong> ' . $this->row_actions( $actions );
151
  if ( ! $post )
152
  return;
153
 
154
+ $t_time = mysql2date( __( 'Y/m/d g:i:s A', 'contact-form-7' ), $post->post_date, true );
155
  $m_time = $post->post_date;
156
  $time = mysql2date( 'G', $post->post_date ) - get_option( 'gmt_offset' ) * 3600;
157
 
158
  $time_diff = time() - $time;
159
 
160
  if ( $time_diff > 0 && $time_diff < 24*60*60 )
161
+ $h_time = sprintf( __( '%s ago', 'contact-form-7' ), human_time_diff( $time ) );
162
  else
163
+ $h_time = mysql2date( __( 'Y/m/d', 'contact-form-7' ), $m_time );
164
 
165
  return '<abbr title="' . $t_time . '">' . $h_time . '</abbr>';
166
  }
admin/includes/meta-boxes.php CHANGED
@@ -41,29 +41,29 @@ function wpcf7_mail_meta_box( $post, $box ) {
41
  <div class="mail-fields">
42
  <div class="half-left">
43
  <div class="mail-field">
44
- <label for="<?php echo $id; ?>-recipient"><?php echo esc_html( __( 'To:', 'wpcf7' ) ); ?></label><br />
45
  <input type="text" id="<?php echo $id; ?>-recipient" name="<?php echo $id; ?>-recipient" class="wide" size="70" value="<?php echo esc_attr( $mail['recipient'] ); ?>" />
46
  </div>
47
 
48
  <div class="mail-field">
49
- <label for="<?php echo $id; ?>-sender"><?php echo esc_html( __( 'From:', 'wpcf7' ) ); ?></label><br />
50
  <input type="text" id="<?php echo $id; ?>-sender" name="<?php echo $id; ?>-sender" class="wide" size="70" value="<?php echo esc_attr( $mail['sender'] ); ?>" />
51
  </div>
52
 
53
  <div class="mail-field">
54
- <label for="<?php echo $id; ?>-subject"><?php echo esc_html( __( 'Subject:', 'wpcf7' ) ); ?></label><br />
55
  <input type="text" id="<?php echo $id; ?>-subject" name="<?php echo $id; ?>-subject" class="wide" size="70" value="<?php echo esc_attr( $mail['subject'] ); ?>" />
56
  </div>
57
 
58
  <div class="pseudo-hr"></div>
59
 
60
  <div class="mail-field">
61
- <label for="<?php echo $id; ?>-additional-headers"><?php echo esc_html( __( 'Additional headers:', 'wpcf7' ) ); ?></label><br />
62
  <textarea id="<?php echo $id; ?>-additional-headers" name="<?php echo $id; ?>-additional-headers" cols="100" rows="2"><?php echo esc_textarea( $mail['additional_headers'] ); ?></textarea>
63
  </div>
64
 
65
  <div class="mail-field">
66
- <label for="<?php echo $id; ?>-attachments"><?php echo esc_html( __( 'File attachments:', 'wpcf7' ) ); ?></label><br />
67
  <textarea id="<?php echo $id; ?>-attachments" name="<?php echo $id; ?>-attachments" cols="100" rows="2"><?php echo esc_textarea( $mail['attachments'] ); ?></textarea>
68
  </div>
69
 
@@ -71,13 +71,13 @@ function wpcf7_mail_meta_box( $post, $box ) {
71
 
72
  <div class="mail-field">
73
  <input type="checkbox" id="<?php echo $id; ?>-use-html" name="<?php echo $id; ?>-use-html" value="1"<?php echo ( $mail['use_html'] ) ? ' checked="checked"' : ''; ?> />
74
- <label for="<?php echo $id; ?>-use-html"><?php echo esc_html( __( 'Use HTML content type', 'wpcf7' ) ); ?></label>
75
  </div>
76
  </div>
77
 
78
  <div class="half-right">
79
  <div class="mail-field">
80
- <label for="<?php echo $id; ?>-body"><?php echo esc_html( __( 'Message body:', 'wpcf7' ) ); ?></label><br />
81
  <textarea id="<?php echo $id; ?>-body" name="<?php echo $id; ?>-body" cols="100" rows="20"><?php echo esc_textarea( $mail['body'] ); ?></textarea>
82
  </div>
83
  </div>
41
  <div class="mail-fields">
42
  <div class="half-left">
43
  <div class="mail-field">
44
+ <label for="<?php echo $id; ?>-recipient"><?php echo esc_html( __( 'To:', 'contact-form-7' ) ); ?></label><br />
45
  <input type="text" id="<?php echo $id; ?>-recipient" name="<?php echo $id; ?>-recipient" class="wide" size="70" value="<?php echo esc_attr( $mail['recipient'] ); ?>" />
46
  </div>
47
 
48
  <div class="mail-field">
49
+ <label for="<?php echo $id; ?>-sender"><?php echo esc_html( __( 'From:', 'contact-form-7' ) ); ?></label><br />
50
  <input type="text" id="<?php echo $id; ?>-sender" name="<?php echo $id; ?>-sender" class="wide" size="70" value="<?php echo esc_attr( $mail['sender'] ); ?>" />
51
  </div>
52
 
53
  <div class="mail-field">
54
+ <label for="<?php echo $id; ?>-subject"><?php echo esc_html( __( 'Subject:', 'contact-form-7' ) ); ?></label><br />
55
  <input type="text" id="<?php echo $id; ?>-subject" name="<?php echo $id; ?>-subject" class="wide" size="70" value="<?php echo esc_attr( $mail['subject'] ); ?>" />
56
  </div>
57
 
58
  <div class="pseudo-hr"></div>
59
 
60
  <div class="mail-field">
61
+ <label for="<?php echo $id; ?>-additional-headers"><?php echo esc_html( __( 'Additional headers:', 'contact-form-7' ) ); ?></label><br />
62
  <textarea id="<?php echo $id; ?>-additional-headers" name="<?php echo $id; ?>-additional-headers" cols="100" rows="2"><?php echo esc_textarea( $mail['additional_headers'] ); ?></textarea>
63
  </div>
64
 
65
  <div class="mail-field">
66
+ <label for="<?php echo $id; ?>-attachments"><?php echo esc_html( __( 'File attachments:', 'contact-form-7' ) ); ?></label><br />
67
  <textarea id="<?php echo $id; ?>-attachments" name="<?php echo $id; ?>-attachments" cols="100" rows="2"><?php echo esc_textarea( $mail['attachments'] ); ?></textarea>
68
  </div>
69
 
71
 
72
  <div class="mail-field">
73
  <input type="checkbox" id="<?php echo $id; ?>-use-html" name="<?php echo $id; ?>-use-html" value="1"<?php echo ( $mail['use_html'] ) ? ' checked="checked"' : ''; ?> />
74
+ <label for="<?php echo $id; ?>-use-html"><?php echo esc_html( __( 'Use HTML content type', 'contact-form-7' ) ); ?></label>
75
  </div>
76
  </div>
77
 
78
  <div class="half-right">
79
  <div class="mail-field">
80
+ <label for="<?php echo $id; ?>-body"><?php echo esc_html( __( 'Message body:', 'contact-form-7' ) ); ?></label><br />
81
  <textarea id="<?php echo $id; ?>-body" name="<?php echo $id; ?>-body" cols="100" rows="20"><?php echo esc_textarea( $mail['body'] ); ?></textarea>
82
  </div>
83
  </div>
admin/js/scripts.js CHANGED
@@ -2,6 +2,23 @@
2
 
3
  $(function() {
4
  try {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  $('div.cf7com-links').insertAfter($('div.wrap h2:first'));
6
 
7
  $.extend($.tgPanes, _wpcf7.tagGenerators);
2
 
3
  $(function() {
4
  try {
5
+ var welcomePanel = $('#welcome-panel');
6
+ var updateWelcomePanel;
7
+
8
+ updateWelcomePanel = function( visible ) {
9
+ $.post( ajaxurl, {
10
+ action: 'wpcf7-update-welcome-panel',
11
+ visible: visible,
12
+ welcomepanelnonce: $( '#welcomepanelnonce' ).val()
13
+ });
14
+ };
15
+
16
+ $('a.welcome-panel-close', welcomePanel).click(function(event) {
17
+ event.preventDefault();
18
+ welcomePanel.addClass('hidden');
19
+ updateWelcomePanel( 0 );
20
+ });
21
+
22
  $('div.cf7com-links').insertAfter($('div.wrap h2:first'));
23
 
24
  $.extend($.tgPanes, _wpcf7.tagGenerators);
includes/classes.php CHANGED
@@ -9,6 +9,7 @@ class WPCF7_ContactForm {
9
  var $initial = false;
10
 
11
  var $id;
 
12
  var $title;
13
 
14
  var $unit_tag;
@@ -24,8 +25,8 @@ class WPCF7_ContactForm {
24
  public static function register_post_type() {
25
  register_post_type( self::post_type, array(
26
  'labels' => array(
27
- 'name' => __( 'Contact Forms', 'wpcf7' ),
28
- 'singular_name' => __( 'Contact Form', 'wpcf7' ) ),
29
  'rewrite' => false,
30
  'query_var' => false ) );
31
  }
@@ -69,6 +70,7 @@ class WPCF7_ContactForm {
69
  if ( $post && self::post_type == get_post_type( $post ) ) {
70
  $this->initial = false;
71
  $this->id = $post->ID;
 
72
  $this->title = $post->post_title;
73
  $this->locale = get_post_meta( $post->ID, '_locale', true );
74
 
@@ -202,6 +204,7 @@ class WPCF7_ContactForm {
202
  global $wpcf7;
203
 
204
  $class = 'wpcf7-response-output';
 
205
  $content = '';
206
 
207
  if ( $this->is_posted() ) { // Post response output for non-AJAX
@@ -215,6 +218,8 @@ class WPCF7_ContactForm {
215
  else
216
  $class .= ' wpcf7-mail-sent-ng';
217
 
 
 
218
  if ( ! empty( $wpcf7->result['message'] ) )
219
  $content = $wpcf7->result['message'];
220
 
@@ -222,10 +227,14 @@ class WPCF7_ContactForm {
222
  $class .= ' wpcf7-display-none';
223
  }
224
 
225
- $class = trim( $class );
 
 
 
 
226
 
227
- $output = sprintf( '<div class="%1$s">%2$s</div>',
228
- $class, esc_html( $content ) );
229
 
230
  return apply_filters( 'wpcf7_form_response_output',
231
  $output, $class, $content, $this );
@@ -245,7 +254,9 @@ class WPCF7_ContactForm {
245
  if ( empty( $ve ) )
246
  return '';
247
 
248
- $ve = '<span class="wpcf7-not-valid-tip-no-ajax">' . esc_html( $ve ) . '</span>';
 
 
249
  return apply_filters( 'wpcf7_validation_error', $ve, $name, $this );
250
  }
251
 
@@ -361,6 +372,7 @@ class WPCF7_ContactForm {
361
 
362
  function submit( $ajax = false ) {
363
  $result = array(
 
364
  'valid' => true,
365
  'invalid_reasons' => array(),
366
  'spam' => false,
@@ -374,18 +386,22 @@ class WPCF7_ContactForm {
374
  $validation = $this->validate();
375
 
376
  if ( ! $validation['valid'] ) { // Validation error occured
 
377
  $result['valid'] = false;
378
  $result['invalid_reasons'] = $validation['reason'];
379
  $result['message'] = $this->message( 'validation_error' );
380
 
381
  } elseif ( ! $this->accepted() ) { // Not accepted terms
 
382
  $result['message'] = $this->message( 'accept_terms' );
383
 
384
  } elseif ( $this->spam() ) { // Spam!
 
385
  $result['message'] = $this->message( 'spam' );
386
  $result['spam'] = true;
387
 
388
  } elseif ( $this->mail() ) {
 
389
  $result['mail_sent'] = true;
390
  $result['message'] = $this->message( 'mail_sent_ok' );
391
 
@@ -401,6 +417,7 @@ class WPCF7_ContactForm {
401
  }
402
 
403
  } else {
 
404
  $result['message'] = $this->message( 'mail_sent_ng' );
405
 
406
  do_action_ref_array( 'wpcf7_mail_failed', array( &$this ) );
@@ -418,6 +435,8 @@ class WPCF7_ContactForm {
418
  @unlink( $path );
419
  }
420
 
 
 
421
  return $result;
422
  }
423
 
@@ -564,7 +583,10 @@ class WPCF7_ContactForm {
564
  }
565
 
566
  function replace_mail_tags( $content, $html = false ) {
567
- $regex = '/(\[?)\[\s*([a-zA-Z_][0-9a-zA-Z:._-]*)\s*\](\]?)/';
 
 
 
568
 
569
  if ( $html )
570
  $callback = array( &$this, 'mail_callback_html' );
@@ -580,11 +602,17 @@ class WPCF7_ContactForm {
580
 
581
  function mail_callback( $matches, $html = false ) {
582
  // allow [[foo]] syntax for escaping a tag
583
- if ( $matches[1] == '[' && $matches[3] == ']' )
584
  return substr( $matches[0], 1, -1 );
585
 
586
  $tag = $matches[0];
587
  $tagname = $matches[2];
 
 
 
 
 
 
588
 
589
  $do_not_heat = false;
590
 
@@ -593,6 +621,13 @@ class WPCF7_ContactForm {
593
  $do_not_heat = true;
594
  }
595
 
 
 
 
 
 
 
 
596
  if ( isset( $this->posted_data[$tagname] ) ) {
597
 
598
  if ( $do_not_heat )
@@ -600,10 +635,16 @@ class WPCF7_ContactForm {
600
  else
601
  $submitted = $this->posted_data[$tagname];
602
 
603
- $replaced = wpcf7_flat_join( $submitted );
 
 
 
 
 
 
604
 
605
  if ( $html ) {
606
- $replaced = strip_tags( $replaced );
607
  $replaced = wptexturize( $replaced );
608
  }
609
 
@@ -621,6 +662,18 @@ class WPCF7_ContactForm {
621
  return $tag;
622
  }
623
 
 
 
 
 
 
 
 
 
 
 
 
 
624
  function mail_attachments( $template ) {
625
  $attachments = array();
626
 
@@ -814,22 +867,14 @@ function wpcf7_get_contact_form_default_pack( $args = '' ) {
814
  $locale = $args['locale'];
815
  $title = $args['title'];
816
 
817
- if ( $locale && $locale != get_locale() ) {
818
- $mo_orig = $l10n['wpcf7'];
819
- unset( $l10n['wpcf7'] );
820
-
821
- if ( 'en_US' != $locale ) {
822
- $mofile = wpcf7_plugin_path( 'languages/wpcf7-' . $locale . '.mo' );
823
- if ( ! load_textdomain( 'wpcf7', $mofile ) ) {
824
- $l10n['wpcf7'] = $mo_orig;
825
- unset( $mo_orig );
826
- }
827
- }
828
  }
829
 
830
  $contact_form = new WPCF7_ContactForm();
831
  $contact_form->initial = true;
832
- $contact_form->title = ( $title ? $title : __( 'Untitled', 'wpcf7' ) );
833
  $contact_form->locale = ( $locale ? $locale : get_locale() );
834
 
835
  $props = $contact_form->get_properties();
@@ -837,12 +882,12 @@ function wpcf7_get_contact_form_default_pack( $args = '' ) {
837
  foreach ( $props as $prop => $value )
838
  $contact_form->{$prop} = wpcf7_get_default_template( $prop );
839
 
840
- if ( isset( $mo_orig ) )
841
- $l10n['wpcf7'] = $mo_orig;
842
-
843
  $contact_form = apply_filters_ref_array( 'wpcf7_contact_form_default_pack',
844
  array( &$contact_form, $args ) );
845
 
 
 
 
846
  return $contact_form;
847
  }
848
 
9
  var $initial = false;
10
 
11
  var $id;
12
+ var $name;
13
  var $title;
14
 
15
  var $unit_tag;
25
  public static function register_post_type() {
26
  register_post_type( self::post_type, array(
27
  'labels' => array(
28
+ 'name' => __( 'Contact Forms', 'contact-form-7' ),
29
+ 'singular_name' => __( 'Contact Form', 'contact-form-7' ) ),
30
  'rewrite' => false,
31
  'query_var' => false ) );
32
  }
70
  if ( $post && self::post_type == get_post_type( $post ) ) {
71
  $this->initial = false;
72
  $this->id = $post->ID;
73
+ $this->name = $post->post_name;
74
  $this->title = $post->post_title;
75
  $this->locale = get_post_meta( $post->ID, '_locale', true );
76
 
204
  global $wpcf7;
205
 
206
  $class = 'wpcf7-response-output';
207
+ $role = '';
208
  $content = '';
209
 
210
  if ( $this->is_posted() ) { // Post response output for non-AJAX
218
  else
219
  $class .= ' wpcf7-mail-sent-ng';
220
 
221
+ $role = 'alert';
222
+
223
  if ( ! empty( $wpcf7->result['message'] ) )
224
  $content = $wpcf7->result['message'];
225
 
227
  $class .= ' wpcf7-display-none';
228
  }
229
 
230
+ $atts = array(
231
+ 'class' => trim( $class ),
232
+ 'role' => trim( $role ) );
233
+
234
+ $atts = wpcf7_format_atts( $atts );
235
 
236
+ $output = sprintf( '<div %1$s>%2$s</div>',
237
+ $atts, esc_html( $content ) );
238
 
239
  return apply_filters( 'wpcf7_form_response_output',
240
  $output, $class, $content, $this );
254
  if ( empty( $ve ) )
255
  return '';
256
 
257
+ $ve = '<span role="alert" class="wpcf7-not-valid-tip">'
258
+ . esc_html( $ve ) . '</span>';
259
+
260
  return apply_filters( 'wpcf7_validation_error', $ve, $name, $this );
261
  }
262
 
372
 
373
  function submit( $ajax = false ) {
374
  $result = array(
375
+ 'status' => 'init',
376
  'valid' => true,
377
  'invalid_reasons' => array(),
378
  'spam' => false,
386
  $validation = $this->validate();
387
 
388
  if ( ! $validation['valid'] ) { // Validation error occured
389
+ $result['status'] = 'validation_failed';
390
  $result['valid'] = false;
391
  $result['invalid_reasons'] = $validation['reason'];
392
  $result['message'] = $this->message( 'validation_error' );
393
 
394
  } elseif ( ! $this->accepted() ) { // Not accepted terms
395
+ $result['status'] = 'acceptance_missing';
396
  $result['message'] = $this->message( 'accept_terms' );
397
 
398
  } elseif ( $this->spam() ) { // Spam!
399
+ $result['status'] = 'spam';
400
  $result['message'] = $this->message( 'spam' );
401
  $result['spam'] = true;
402
 
403
  } elseif ( $this->mail() ) {
404
+ $result['status'] = 'mail_sent';
405
  $result['mail_sent'] = true;
406
  $result['message'] = $this->message( 'mail_sent_ok' );
407
 
417
  }
418
 
419
  } else {
420
+ $result['status'] = 'mail_failed';
421
  $result['message'] = $this->message( 'mail_sent_ng' );
422
 
423
  do_action_ref_array( 'wpcf7_mail_failed', array( &$this ) );
435
  @unlink( $path );
436
  }
437
 
438
+ do_action_ref_array( 'wpcf7_submit', array( &$this, $result ) );
439
+
440
  return $result;
441
  }
442
 
583
  }
584
 
585
  function replace_mail_tags( $content, $html = false ) {
586
+ $regex = '/(\[?)\[[\t ]*'
587
+ . '([a-zA-Z_][0-9a-zA-Z:._-]*)' // [2] = name
588
+ . '((?:[\t ]+"[^"]*"|[\t ]+\'[^\']*\')*)' // [3] = values
589
+ . '[\t ]*\](\]?)/';
590
 
591
  if ( $html )
592
  $callback = array( &$this, 'mail_callback_html' );
602
 
603
  function mail_callback( $matches, $html = false ) {
604
  // allow [[foo]] syntax for escaping a tag
605
+ if ( $matches[1] == '[' && $matches[4] == ']' )
606
  return substr( $matches[0], 1, -1 );
607
 
608
  $tag = $matches[0];
609
  $tagname = $matches[2];
610
+ $values = $matches[3];
611
+
612
+ if ( ! empty( $values ) ) {
613
+ preg_match_all( '/"[^"]*"|\'[^\']*\'/', $values, $matches );
614
+ $values = wpcf7_strip_quote_deep( $matches[0] );
615
+ }
616
 
617
  $do_not_heat = false;
618
 
621
  $do_not_heat = true;
622
  }
623
 
624
+ $format = '';
625
+
626
+ if ( preg_match( '/^_format_(.+)$/', $tagname, $matches ) ) {
627
+ $tagname = trim( $matches[1] );
628
+ $format = $values[0];
629
+ }
630
+
631
  if ( isset( $this->posted_data[$tagname] ) ) {
632
 
633
  if ( $do_not_heat )
635
  else
636
  $submitted = $this->posted_data[$tagname];
637
 
638
+ $replaced = $submitted;
639
+
640
+ if ( ! empty( $format ) ) {
641
+ $replaced = $this->format( $replaced, $format );
642
+ }
643
+
644
+ $replaced = wpcf7_flat_join( $replaced );
645
 
646
  if ( $html ) {
647
+ $replaced = esc_html( $replaced );
648
  $replaced = wptexturize( $replaced );
649
  }
650
 
662
  return $tag;
663
  }
664
 
665
+ function format( $original, $format ) {
666
+ $original = (array) $original;
667
+
668
+ foreach ( $original as $key => $value ) {
669
+ if ( preg_match( '/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $value ) ) {
670
+ $original[$key] = mysql2date( $format, $value );
671
+ }
672
+ }
673
+
674
+ return $original;
675
+ }
676
+
677
  function mail_attachments( $template ) {
678
  $attachments = array();
679
 
867
  $locale = $args['locale'];
868
  $title = $args['title'];
869
 
870
+ if ( $locale ) {
871
+ $mo_orig = $l10n['contact-form-7'];
872
+ wpcf7_load_textdomain( $locale );
 
 
 
 
 
 
 
 
873
  }
874
 
875
  $contact_form = new WPCF7_ContactForm();
876
  $contact_form->initial = true;
877
+ $contact_form->title = ( $title ? $title : __( 'Untitled', 'contact-form-7' ) );
878
  $contact_form->locale = ( $locale ? $locale : get_locale() );
879
 
880
  $props = $contact_form->get_properties();
882
  foreach ( $props as $prop => $value )
883
  $contact_form->{$prop} = wpcf7_get_default_template( $prop );
884
 
 
 
 
885
  $contact_form = apply_filters_ref_array( 'wpcf7_contact_form_default_pack',
886
  array( &$contact_form, $args ) );
887
 
888
+ if ( isset( $mo_orig ) )
889
+ $l10n['contact-form-7'] = $mo_orig;
890
+
891
  return $contact_form;
892
  }
893
 
includes/controller.php CHANGED
@@ -161,7 +161,7 @@ function wpcf7_widget_text_filter( $content ) {
161
 
162
  /* Shortcodes */
163
 
164
- add_action( 'plugins_loaded', 'wpcf7_add_shortcodes', 1 );
165
 
166
  function wpcf7_add_shortcodes() {
167
  add_shortcode( 'contact-form-7', 'wpcf7_contact_form_tag_func' );
@@ -228,7 +228,7 @@ function wpcf7_enqueue_scripts() {
228
  wp_deregister_script( 'jquery-form' );
229
  wp_register_script( 'jquery-form',
230
  wpcf7_plugin_url( 'includes/js/jquery.form.min.js' ),
231
- array( 'jquery' ), '3.45.0-2013.10.17', true );
232
 
233
  $in_footer = true;
234
  if ( 'header' === WPCF7_LOAD_JS )
@@ -240,7 +240,7 @@ function wpcf7_enqueue_scripts() {
240
 
241
  $_wpcf7 = array(
242
  'loaderUrl' => wpcf7_ajax_loader(),
243
- 'sending' => __( 'Sending ...', 'wpcf7' ) );
244
 
245
  if ( defined( 'WP_CACHE' ) && WP_CACHE )
246
  $_wpcf7['cached'] = 1;
161
 
162
  /* Shortcodes */
163
 
164
+ add_action( 'plugins_loaded', 'wpcf7_add_shortcodes' );
165
 
166
  function wpcf7_add_shortcodes() {
167
  add_shortcode( 'contact-form-7', 'wpcf7_contact_form_tag_func' );
228
  wp_deregister_script( 'jquery-form' );
229
  wp_register_script( 'jquery-form',
230
  wpcf7_plugin_url( 'includes/js/jquery.form.min.js' ),
231
+ array( 'jquery' ), '3.46.0-2013.11.21', true );
232
 
233
  $in_footer = true;
234
  if ( 'header' === WPCF7_LOAD_JS )
240
 
241
  $_wpcf7 = array(
242
  'loaderUrl' => wpcf7_ajax_loader(),
243
+ 'sending' => __( 'Sending ...', 'contact-form-7' ) );
244
 
245
  if ( defined( 'WP_CACHE' ) && WP_CACHE )
246
  $_wpcf7['cached'] = 1;
includes/css/styles-rtl.css CHANGED
@@ -1,11 +1,7 @@
1
  span.wpcf7-not-valid-tip {
2
- left: auto;
3
- right: 20%;
4
- direction: rtl;
5
- }
6
- span.wpcf7-not-valid-tip-no-ajax {
7
  direction: rtl;
8
  }
 
9
  span.wpcf7-list-item {
10
  margin-left: 0;
11
  margin-right: 0.5em;
1
  span.wpcf7-not-valid-tip {
 
 
 
 
 
2
  direction: rtl;
3
  }
4
+
5
  span.wpcf7-list-item {
6
  margin-left: 0;
7
  margin-right: 0.5em;
includes/css/styles.css CHANGED
@@ -29,20 +29,8 @@ span.wpcf7-form-control-wrap {
29
  }
30
 
31
  span.wpcf7-not-valid-tip {
32
- position: absolute;
33
- top: 20%;
34
- left: 20%;
35
- z-index: 100;
36
- background: #fff;
37
- border: 1px solid #ff0000;
38
- font-size: 10pt;
39
- width: 280px;
40
- padding: 2px;
41
- }
42
-
43
- span.wpcf7-not-valid-tip-no-ajax {
44
  color: #f00;
45
- font-size: 10pt;
46
  display: block;
47
  }
48
 
29
  }
30
 
31
  span.wpcf7-not-valid-tip {
 
 
 
 
 
 
 
 
 
 
 
 
32
  color: #f00;
33
+ font-size: 1em;
34
  display: block;
35
  }
36
 
includes/functions.php CHANGED
@@ -18,42 +18,42 @@ function wpcf7_deprecated_function( $function, $version, $replacement = null ) {
18
 
19
  if ( WP_DEBUG && apply_filters( 'wpcf7_deprecated_function_trigger_error', true ) ) {
20
  if ( ! is_null( $replacement ) )
21
- trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.', 'wpcf7' ), $function, $version, $replacement ) );
22
  else
23
- trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s with no alternative available.', 'wpcf7' ), $function, $version ) );
24
  }
25
  }
26
 
27
  function wpcf7_messages() {
28
  $messages = array(
29
  'mail_sent_ok' => array(
30
- 'description' => __( "Sender's message was sent successfully", 'wpcf7' ),
31
- 'default' => __( 'Your message was sent successfully. Thanks.', 'wpcf7' )
32
  ),
33
 
34
  'mail_sent_ng' => array(
35
- 'description' => __( "Sender's message was failed to send", 'wpcf7' ),
36
- 'default' => __( 'Failed to send your message. Please try later or contact the administrator by another method.', 'wpcf7' )
37
  ),
38
 
39
  'validation_error' => array(
40
- 'description' => __( "Validation errors occurred", 'wpcf7' ),
41
- 'default' => __( 'Validation errors occurred. Please confirm the fields and submit it again.', 'wpcf7' )
42
  ),
43
 
44
  'spam' => array(
45
- 'description' => __( "Submission was referred to as spam", 'wpcf7' ),
46
- 'default' => __( 'Failed to send your message. Please try later or contact the administrator by another method.', 'wpcf7' )
47
  ),
48
 
49
  'accept_terms' => array(
50
- 'description' => __( "There are terms that the sender must accept", 'wpcf7' ),
51
- 'default' => __( 'Please accept the terms to proceed.', 'wpcf7' )
52
  ),
53
 
54
  'invalid_required' => array(
55
- 'description' => __( "There is a field that the sender must fill in", 'wpcf7' ),
56
- 'default' => __( 'Please fill the required field.', 'wpcf7' )
57
  )
58
  );
59
 
@@ -77,15 +77,15 @@ function wpcf7_get_default_template( $prop = 'form' ) {
77
 
78
  function wpcf7_default_form_template() {
79
  $template =
80
- '<p>' . __( 'Your Name', 'wpcf7' ) . ' ' . __( '(required)', 'wpcf7' ) . '<br />' . "\n"
81
  . ' [text* your-name] </p>' . "\n\n"
82
- . '<p>' . __( 'Your Email', 'wpcf7' ) . ' ' . __( '(required)', 'wpcf7' ) . '<br />' . "\n"
83
  . ' [email* your-email] </p>' . "\n\n"
84
- . '<p>' . __( 'Subject', 'wpcf7' ) . '<br />' . "\n"
85
  . ' [text your-subject] </p>' . "\n\n"
86
- . '<p>' . __( 'Your Message', 'wpcf7' ) . '<br />' . "\n"
87
  . ' [textarea your-message] </p>' . "\n\n"
88
- . '<p>[submit "' . __( 'Send', 'wpcf7' ) . '"]</p>';
89
 
90
  return $template;
91
  }
@@ -93,10 +93,10 @@ function wpcf7_default_form_template() {
93
  function wpcf7_default_mail_template() {
94
  $subject = '[your-subject]';
95
  $sender = '[your-name] <[your-email]>';
96
- $body = sprintf( __( 'From: %s', 'wpcf7' ), '[your-name] <[your-email]>' ) . "\n"
97
- . sprintf( __( 'Subject: %s', 'wpcf7' ), '[your-subject]' ) . "\n\n"
98
- . __( 'Message Body:', 'wpcf7' ) . "\n" . '[your-message]' . "\n\n" . '--' . "\n"
99
- . sprintf( __( 'This e-mail was sent from a contact form on %1$s (%2$s)', 'wpcf7' ),
100
  get_bloginfo( 'name' ), get_bloginfo( 'url' ) );
101
  $recipient = get_option( 'admin_email' );
102
  $additional_headers = '';
@@ -109,8 +109,8 @@ function wpcf7_default_mail_2_template() {
109
  $active = false;
110
  $subject = '[your-subject]';
111
  $sender = '[your-name] <[your-email]>';
112
- $body = __( 'Message Body:', 'wpcf7' ) . "\n" . '[your-message]' . "\n\n" . '--' . "\n"
113
- . sprintf( __( 'This e-mail was sent from a contact form on %1$s (%2$s)', 'wpcf7' ),
114
  get_bloginfo( 'name' ), get_bloginfo( 'url' ) );
115
  $recipient = '[your-email]';
116
  $additional_headers = '';
@@ -161,68 +161,68 @@ function wp_is_writable( $path ) {
161
 
162
  function wpcf7_l10n() {
163
  $l10n = array(
164
- 'af' => __( 'Afrikaans', 'wpcf7' ),
165
- 'sq' => __( 'Albanian', 'wpcf7' ),
166
- 'ar' => __( 'Arabic', 'wpcf7' ),
167
- 'hy_AM' => __( 'Armenian', 'wpcf7' ),
168
- 'az_AZ' => __( 'Azerbaijani', 'wpcf7' ),
169
- 'bn_BD' => __( 'Bangla', 'wpcf7' ),
170
- 'eu' => __( 'Basque', 'wpcf7' ),
171
- 'be_BY' => __( 'Belarusian', 'wpcf7' ),
172
- 'bs' => __( 'Bosnian', 'wpcf7' ),
173
- 'pt_BR' => __( 'Brazilian Portuguese', 'wpcf7' ),
174
- 'bg_BG' => __( 'Bulgarian', 'wpcf7' ),
175
- 'ca' => __( 'Catalan', 'wpcf7' ),
176
- 'ckb' => __( 'Central Kurdish', 'wpcf7' ),
177
- 'zh_CN' => __( 'Chinese (Simplified)', 'wpcf7' ),
178
- 'zh_TW' => __( 'Chinese (Traditional)', 'wpcf7' ),
179
- 'hr' => __( 'Croatian', 'wpcf7' ),
180
- 'cs_CZ' => __( 'Czech', 'wpcf7' ),
181
- 'da_DK' => __( 'Danish', 'wpcf7' ),
182
- 'nl_NL' => __( 'Dutch', 'wpcf7' ),
183
- 'en_US' => __( 'English', 'wpcf7' ),
184
- 'eo_EO' => __( 'Esperanto', 'wpcf7' ),
185
- 'et' => __( 'Estonian', 'wpcf7' ),
186
- 'fi' => __( 'Finnish', 'wpcf7' ),
187
- 'fr_FR' => __( 'French', 'wpcf7' ),
188
- 'gl_ES' => __( 'Galician', 'wpcf7' ),
189
- 'gu_IN' => __( 'Gujarati', 'wpcf7' ),
190
- 'ka_GE' => __( 'Georgian', 'wpcf7' ),
191
- 'de_DE' => __( 'German', 'wpcf7' ),
192
- 'el' => __( 'Greek', 'wpcf7' ),
193
- 'he_IL' => __( 'Hebrew', 'wpcf7' ),
194
- 'hi_IN' => __( 'Hindi', 'wpcf7' ),
195
- 'hu_HU' => __( 'Hungarian', 'wpcf7' ),
196
- 'bn_IN' => __( 'Indian Bengali', 'wpcf7' ),
197
- 'id_ID' => __( 'Indonesian', 'wpcf7' ),
198
- 'ga_IE' => __( 'Irish', 'wpcf7' ),
199
- 'it_IT' => __( 'Italian', 'wpcf7' ),
200
- 'ja' => __( 'Japanese', 'wpcf7' ),
201
- 'ko_KR' => __( 'Korean', 'wpcf7' ),
202
- 'lv' => __( 'Latvian', 'wpcf7' ),
203
- 'lt_LT' => __( 'Lithuanian', 'wpcf7' ),
204
- 'mk_MK' => __( 'Macedonian', 'wpcf7' ),
205
- 'ms_MY' => __( 'Malay', 'wpcf7' ),
206
- 'ml_IN' => __( 'Malayalam', 'wpcf7' ),
207
- 'mt_MT' => __( 'Maltese', 'wpcf7' ),
208
- 'nb_NO' => __( 'Norwegian', 'wpcf7' ),
209
- 'fa_IR' => __( 'Persian', 'wpcf7' ),
210
- 'pl_PL' => __( 'Polish', 'wpcf7' ),
211
- 'pt_PT' => __( 'Portuguese', 'wpcf7' ),
212
- 'ru_RU' => __( 'Russian', 'wpcf7' ),
213
- 'ro_RO' => __( 'Romanian', 'wpcf7' ),
214
- 'sr_RS' => __( 'Serbian', 'wpcf7' ),
215
- 'si_LK' => __( 'Sinhala', 'wpcf7' ),
216
- 'sk_SK' => __( 'Slovak', 'wpcf7' ),
217
- 'sl_SI' => __( 'Slovene', 'wpcf7' ),
218
- 'es_ES' => __( 'Spanish', 'wpcf7' ),
219
- 'sv_SE' => __( 'Swedish', 'wpcf7' ),
220
- 'ta' => __( 'Tamil', 'wpcf7' ),
221
- 'th' => __( 'Thai', 'wpcf7' ),
222
- 'tl' => __( 'Tagalog', 'wpcf7' ),
223
- 'tr_TR' => __( 'Turkish', 'wpcf7' ),
224
- 'uk' => __( 'Ukrainian', 'wpcf7' ),
225
- 'vi' => __( 'Vietnamese', 'wpcf7' )
226
  );
227
 
228
  return $l10n;
@@ -331,4 +331,76 @@ function wpcf7_format_atts( $atts ) {
331
  return $html;
332
  }
333
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  ?>
18
 
19
  if ( WP_DEBUG && apply_filters( 'wpcf7_deprecated_function_trigger_error', true ) ) {
20
  if ( ! is_null( $replacement ) )
21
+ trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s! Use %3$s instead.', 'contact-form-7' ), $function, $version, $replacement ) );
22
  else
23
+ trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since Contact Form 7 version %2$s with no alternative available.', 'contact-form-7' ), $function, $version ) );
24
  }
25
  }
26
 
27
  function wpcf7_messages() {
28
  $messages = array(
29
  'mail_sent_ok' => array(
30
+ 'description' => __( "Sender's message was sent successfully", 'contact-form-7' ),
31
+ 'default' => __( 'Your message was sent successfully. Thanks.', 'contact-form-7' )
32
  ),
33
 
34
  'mail_sent_ng' => array(
35
+ 'description' => __( "Sender's message was failed to send", 'contact-form-7' ),
36
+ 'default' => __( 'Failed to send your message. Please try later or contact the administrator by another method.', 'contact-form-7' )
37
  ),
38
 
39
  'validation_error' => array(
40
+ 'description' => __( "Validation errors occurred", 'contact-form-7' ),
41
+ 'default' => __( 'Validation errors occurred. Please confirm the fields and submit it again.', 'contact-form-7' )
42
  ),
43
 
44
  'spam' => array(
45
+ 'description' => __( "Submission was referred to as spam", 'contact-form-7' ),
46
+ 'default' => __( 'Failed to send your message. Please try later or contact the administrator by another method.', 'contact-form-7' )
47
  ),
48
 
49
  'accept_terms' => array(
50
+ 'description' => __( "There are terms that the sender must accept", 'contact-form-7' ),
51
+ 'default' => __( 'Please accept the terms to proceed.', 'contact-form-7' )
52
  ),
53
 
54
  'invalid_required' => array(
55
+ 'description' => __( "There is a field that the sender must fill in", 'contact-form-7' ),
56
+ 'default' => __( 'Please fill the required field.', 'contact-form-7' )
57
  )
58
  );
59
 
77
 
78
  function wpcf7_default_form_template() {
79
  $template =
80
+ '<p>' . __( 'Your Name', 'contact-form-7' ) . ' ' . __( '(required)', 'contact-form-7' ) . '<br />' . "\n"
81
  . ' [text* your-name] </p>' . "\n\n"
82
+ . '<p>' . __( 'Your Email', 'contact-form-7' ) . ' ' . __( '(required)', 'contact-form-7' ) . '<br />' . "\n"
83
  . ' [email* your-email] </p>' . "\n\n"
84
+ . '<p>' . __( 'Subject', 'contact-form-7' ) . '<br />' . "\n"
85
  . ' [text your-subject] </p>' . "\n\n"
86
+ . '<p>' . __( 'Your Message', 'contact-form-7' ) . '<br />' . "\n"
87
  . ' [textarea your-message] </p>' . "\n\n"
88
+ . '<p>[submit "' . __( 'Send', 'contact-form-7' ) . '"]</p>';
89
 
90
  return $template;
91
  }
93
  function wpcf7_default_mail_template() {
94
  $subject = '[your-subject]';
95
  $sender = '[your-name] <[your-email]>';
96
+ $body = sprintf( __( 'From: %s', 'contact-form-7' ), '[your-name] <[your-email]>' ) . "\n"
97
+ . sprintf( __( 'Subject: %s', 'contact-form-7' ), '[your-subject]' ) . "\n\n"
98
+ . __( 'Message Body:', 'contact-form-7' ) . "\n" . '[your-message]' . "\n\n" . '--' . "\n"
99
+ . sprintf( __( 'This e-mail was sent from a contact form on %1$s (%2$s)', 'contact-form-7' ),
100
  get_bloginfo( 'name' ), get_bloginfo( 'url' ) );
101
  $recipient = get_option( 'admin_email' );
102
  $additional_headers = '';
109
  $active = false;
110
  $subject = '[your-subject]';
111
  $sender = '[your-name] <[your-email]>';
112
+ $body = __( 'Message Body:', 'contact-form-7' ) . "\n" . '[your-message]' . "\n\n" . '--' . "\n"
113
+ . sprintf( __( 'This e-mail was sent from a contact form on %1$s (%2$s)', 'contact-form-7' ),
114
  get_bloginfo( 'name' ), get_bloginfo( 'url' ) );
115
  $recipient = '[your-email]';
116
  $additional_headers = '';
161
 
162
  function wpcf7_l10n() {
163
  $l10n = array(
164
+ 'af' => __( 'Afrikaans', 'contact-form-7' ),
165
+ 'sq' => __( 'Albanian', 'contact-form-7' ),
166
+ 'ar' => __( 'Arabic', 'contact-form-7' ),
167
+ 'hy_AM' => __( 'Armenian', 'contact-form-7' ),
168
+ 'az_AZ' => __( 'Azerbaijani', 'contact-form-7' ),
169
+ 'bn_BD' => __( 'Bangla', 'contact-form-7' ),
170
+ 'eu' => __( 'Basque', 'contact-form-7' ),
171
+ 'be_BY' => __( 'Belarusian', 'contact-form-7' ),
172
+ 'bs' => __( 'Bosnian', 'contact-form-7' ),
173
+ 'pt_BR' => __( 'Brazilian Portuguese', 'contact-form-7' ),
174
+ 'bg_BG' => __( 'Bulgarian', 'contact-form-7' ),
175
+ 'ca' => __( 'Catalan', 'contact-form-7' ),
176
+ 'ckb' => __( 'Central Kurdish', 'contact-form-7' ),
177
+ 'zh_CN' => __( 'Chinese (Simplified)', 'contact-form-7' ),
178
+ 'zh_TW' => __( 'Chinese (Traditional)', 'contact-form-7' ),
179
+ 'hr' => __( 'Croatian', 'contact-form-7' ),
180
+ 'cs_CZ' => __( 'Czech', 'contact-form-7' ),
181
+ 'da_DK' => __( 'Danish', 'contact-form-7' ),
182
+ 'nl_NL' => __( 'Dutch', 'contact-form-7' ),
183
+ 'en_US' => __( 'English', 'contact-form-7' ),
184
+ 'eo_EO' => __( 'Esperanto', 'contact-form-7' ),
185
+ 'et' => __( 'Estonian', 'contact-form-7' ),
186
+ 'fi' => __( 'Finnish', 'contact-form-7' ),
187
+ 'fr_FR' => __( 'French', 'contact-form-7' ),
188
+ 'gl_ES' => __( 'Galician', 'contact-form-7' ),
189
+ 'gu_IN' => __( 'Gujarati', 'contact-form-7' ),
190
+ 'ka_GE' => __( 'Georgian', 'contact-form-7' ),
191
+ 'de_DE' => __( 'German', 'contact-form-7' ),
192
+ 'el' => __( 'Greek', 'contact-form-7' ),
193
+ 'he_IL' => __( 'Hebrew', 'contact-form-7' ),
194
+ 'hi_IN' => __( 'Hindi', 'contact-form-7' ),
195
+ 'hu_HU' => __( 'Hungarian', 'contact-form-7' ),
196
+ 'bn_IN' => __( 'Indian Bengali', 'contact-form-7' ),
197
+ 'id_ID' => __( 'Indonesian', 'contact-form-7' ),
198
+ 'ga_IE' => __( 'Irish', 'contact-form-7' ),
199
+ 'it_IT' => __( 'Italian', 'contact-form-7' ),
200
+ 'ja' => __( 'Japanese', 'contact-form-7' ),
201
+ 'ko_KR' => __( 'Korean', 'contact-form-7' ),
202
+ 'lv' => __( 'Latvian', 'contact-form-7' ),
203
+ 'lt_LT' => __( 'Lithuanian', 'contact-form-7' ),
204
+ 'mk_MK' => __( 'Macedonian', 'contact-form-7' ),
205
+ 'ms_MY' => __( 'Malay', 'contact-form-7' ),
206
+ 'ml_IN' => __( 'Malayalam', 'contact-form-7' ),
207
+ 'mt_MT' => __( 'Maltese', 'contact-form-7' ),
208
+ 'nb_NO' => __( 'Norwegian', 'contact-form-7' ),
209
+ 'fa_IR' => __( 'Persian', 'contact-form-7' ),
210
+ 'pl_PL' => __( 'Polish', 'contact-form-7' ),
211
+ 'pt_PT' => __( 'Portuguese', 'contact-form-7' ),
212
+ 'ru_RU' => __( 'Russian', 'contact-form-7' ),
213
+ 'ro_RO' => __( 'Romanian', 'contact-form-7' ),
214
+ 'sr_RS' => __( 'Serbian', 'contact-form-7' ),
215
+ 'si_LK' => __( 'Sinhala', 'contact-form-7' ),
216
+ 'sk_SK' => __( 'Slovak', 'contact-form-7' ),
217
+ 'sl_SI' => __( 'Slovene', 'contact-form-7' ),
218
+ 'es_ES' => __( 'Spanish', 'contact-form-7' ),
219
+ 'sv_SE' => __( 'Swedish', 'contact-form-7' ),
220
+ 'ta' => __( 'Tamil', 'contact-form-7' ),
221
+ 'th' => __( 'Thai', 'contact-form-7' ),
222
+ 'tl' => __( 'Tagalog', 'contact-form-7' ),
223
+ 'tr_TR' => __( 'Turkish', 'contact-form-7' ),
224
+ 'uk' => __( 'Ukrainian', 'contact-form-7' ),
225
+ 'vi' => __( 'Vietnamese', 'contact-form-7' )
226
  );
227
 
228
  return $l10n;
331
  return $html;
332
  }
333
 
334
+ function wpcf7_load_textdomain( $locale = null ) {
335
+ global $l10n;
336
+
337
+ $domain = 'contact-form-7';
338
+
339
+ if ( get_locale() == $locale ) {
340
+ $locale = null;
341
+ }
342
+
343
+ if ( empty( $locale ) ) {
344
+ if ( is_textdomain_loaded( $domain ) ) {
345
+ return true;
346
+ } else {
347
+ return load_plugin_textdomain( $domain, false, $domain . '/languages' );
348
+ }
349
+ } else {
350
+ $mo_orig = $l10n[$domain];
351
+ unload_textdomain( $domain );
352
+
353
+ $mofile = $domain . '-' . $locale . '.mo';
354
+ $path = WP_PLUGIN_DIR . '/' . $domain . '/languages';
355
+
356
+ if ( $loaded = load_textdomain( $domain, $path . '/'. $mofile ) ) {
357
+ return $loaded;
358
+ } else {
359
+ $mofile = WP_LANG_DIR . '/plugins/' . $mofile;
360
+ return load_textdomain( $domain, $mofile );
361
+ }
362
+
363
+ $l10n[$domain] = $mo_orig;
364
+ }
365
+
366
+ return false;
367
+ }
368
+
369
+ function wpcf7_load_modules() {
370
+ $dir = WPCF7_PLUGIN_MODULES_DIR;
371
+
372
+ if ( empty( $dir ) || ! is_dir( $dir ) ) {
373
+ return false;
374
+ }
375
+
376
+ $mods = array(
377
+ 'acceptance', 'flamingo', 'special-mail-tags',
378
+ 'akismet', 'jetpack', 'submit', 'captcha', 'number',
379
+ 'text', 'checkbox', 'quiz', 'textarea', 'date',
380
+ 'response', 'file', 'select' );
381
+
382
+ foreach ( $mods as $mod ) {
383
+ $file = trailingslashit( $dir ) . $mod . '.php';
384
+
385
+ if ( file_exists( $file ) ) {
386
+ include_once $file;
387
+ }
388
+ }
389
+ }
390
+
391
+ function wpcf7_get_request_uri() {
392
+ global $wpcf7;
393
+
394
+ return (string) $wpcf7->request_uri;
395
+ }
396
+
397
+ function wpcf7_register_post_types() {
398
+ if ( class_exists( 'WPCF7_ContactForm' ) ) {
399
+ WPCF7_ContactForm::register_post_type();
400
+ return true;
401
+ } else {
402
+ return false;
403
+ }
404
+ }
405
+
406
  ?>
includes/js/jquery.form.js CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
  * jQuery Form Plugin
3
- * version: 3.45.0-2013.10.17
4
  * Requires jQuery v1.5 or later
5
  * Copyright (c) 2013 M. Alsup
6
  * Examples and documentation at: http://malsup.com/jquery/form/
@@ -9,7 +9,19 @@
9
  * https://github.com/malsup/form#copyright-and-license
10
  */
11
  /*global ActiveXObject */
12
- ;(function($) {
 
 
 
 
 
 
 
 
 
 
 
 
13
  "use strict";
14
 
15
  /*
@@ -1201,4 +1213,5 @@ function log() {
1201
  }
1202
  }
1203
 
1204
- })( (typeof(jQuery) != 'undefined') ? jQuery : window.Zepto );
 
1
  /*!
2
  * jQuery Form Plugin
3
+ * version: 3.46.0-2013.11.21
4
  * Requires jQuery v1.5 or later
5
  * Copyright (c) 2013 M. Alsup
6
  * Examples and documentation at: http://malsup.com/jquery/form/
9
  * https://github.com/malsup/form#copyright-and-license
10
  */
11
  /*global ActiveXObject */
12
+
13
+ // AMD support
14
+ (function (factory) {
15
+ if (typeof define === 'function' && define.amd) {
16
+ // using AMD; register as anon module
17
+ define(['jquery'], factory);
18
+ } else {
19
+ // no AMD; invoke directly
20
+ factory( (typeof(jQuery) != 'undefined') ? jQuery : window.Zepto );
21
+ }
22
+ }
23
+
24
+ (function($) {
25
  "use strict";
26
 
27
  /*
1213
  }
1214
  }
1215
 
1216
+ }));
1217
+
includes/js/jquery.form.min.js CHANGED
@@ -1,7 +1,7 @@
1
  /*
2
- * jQuery Form Plugin; v20131017
3
  * http://jquery.malsup.com/form/
4
  * Copyright (c) 2013 M. Alsup; Dual licensed: MIT/GPL
5
  * https://github.com/malsup/form#copyright-and-license
6
  */
7
- ;(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=this;if(i.clk=r,"image"==r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n={};n.fileapi=void 0!==e("<input type='file'/>").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;o>a;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function o(a){for(var n=new FormData,i=0;a.length>i;i++)n.append(a[i].name,a[i].value);if(t.extraData){var o=r(t.extraData);for(i=0;o.length>i;i++)o[i]&&n.append(o[i][0],o[i][1])}t.data=null;var s=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:u||"POST"});t.uploadProgress&&(s.xhr=function(){var r=e.ajaxSettings.xhr();return r.upload&&r.upload.addEventListener("progress",function(e){var r=0,a=e.loaded||e.position,n=e.total;e.lengthComputable&&(r=Math.ceil(100*(a/n))),t.uploadProgress(e,a,n,r)},!1),r}),s.data=null;var l=s.beforeSend;return s.beforeSend=function(e,r){r.data=t.formData?t.formData:n,l&&l.call(this,e,r)},e.ajax(s)}function s(r){function n(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(r){a("cannot get iframe.contentWindow document: "+r)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(r){a("cannot get iframe.contentDocument: "+r),t=e.document}return t}function o(){function t(){try{var e=n(g).readyState;a("state = "+e),e&&"uninitialized"==e.toLowerCase()&&setTimeout(t,50)}catch(r){a("Server abort: ",r," (",r.name,")"),s(k),j&&clearTimeout(j),j=void 0}}var r=f.attr2("target"),i=f.attr2("action");w.setAttribute("target",d),(!u||/post/i.test(u))&&w.setAttribute("method","POST"),i!=m.url&&w.setAttribute("action",m.url),m.skipEncodingOverride||u&&!/post/i.test(u)||f.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),m.timeout&&(j=setTimeout(function(){T=!0,s(D)},m.timeout));var o=[];try{if(m.extraData)for(var l in m.extraData)m.extraData.hasOwnProperty(l)&&(e.isPlainObject(m.extraData[l])&&m.extraData[l].hasOwnProperty("name")&&m.extraData[l].hasOwnProperty("value")?o.push(e('<input type="hidden" name="'+m.extraData[l].name+'">').val(m.extraData[l].value).appendTo(w)[0]):o.push(e('<input type="hidden" name="'+l+'">').val(m.extraData[l]).appendTo(w)[0]));m.iframeTarget||v.appendTo("body"),g.attachEvent?g.attachEvent("onload",s):g.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(c){var p=document.createElement("form").submit;p.apply(w)}}finally{w.setAttribute("action",i),r?w.setAttribute("target",r):f.removeAttr("target"),e(o).remove()}}function s(t){if(!x.aborted&&!F){if(M=n(g),M||(a("cannot access response document"),t=k),t===D&&x)return x.abort("timeout"),S.reject(x,"timeout"),void 0;if(t==k&&x)return x.abort("server abort"),S.reject(x,"error","server abort"),void 0;if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",s):g.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O)return a("requeing onLoad callback, DOM not available"),setTimeout(s,250),void 0;var u=M.body?M.body:M.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){var t={"content-type":m.dataType};return t[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var l=(m.dataType||"").toLowerCase(),c=/(json|script|text)/.test(l);if(c||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f)x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText;else if(c){var d=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];d?x.responseText=d.textContent?d.textContent:d.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}else"xml"==l&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText));try{E=_(x,l,m)}catch(b){i="parsererror",x.error=r=b||i}}catch(b){a("error caught: ",b),i="error",x.error=r=b||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&300>x.status||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,E,"success",x),S.resolve(x.responseText,"success",x),p&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),p&&e.event.trigger("ajaxError",[x,m,r])),p&&e.event.trigger("ajaxComplete",[x,m]),p&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget?v.attr("src",m.iframeSrc):v.remove(),x.responseXML=null},100)}}}var l,c,m,p,d,v,g,x,b,y,T,j,w=f[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(c=0;h.length>c;c++)l=e(h[c]),i?l.prop("disabled",!1):l.removeAttr("disabled");if(m=e.extend(!0,{},e.ajaxSettings,t),m.context=m.context||m,d="jqFormIO"+(new Date).getTime(),m.iframeTarget?(v=e(m.iframeTarget),y=v.attr2("name"),y?d=y:v.attr2("name",d)):(v=e('<iframe name="'+d+'" src="'+m.iframeSrc+'" />'),v.css({position:"absolute",top:"-1000px",left:"-1000px"})),g=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand("Stop")}catch(n){}v.attr("src",m.iframeSrc),x.error=r,m.error&&m.error.call(m.context,x,r,t),p&&e.event.trigger("ajaxError",[x,m,r]),m.complete&&m.complete.call(m.context,x,r)}},p=m.global,p&&0===e.active++&&e.event.trigger("ajaxStart"),p&&e.event.trigger("ajaxSend",[x,m]),m.beforeSend&&m.beforeSend.call(m.context,x,m)===!1)return m.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;b=w.clk,b&&(y=b.name,y&&!b.disabled&&(m.extraData=m.extraData||{},m.extraData[y]=b.value,"image"==b.type&&(m.extraData[y+".x"]=w.clk_x,m.extraData[y+".y"]=w.clk_y)));var D=1,k=2,A=e("meta[name=csrf-token]").attr("content"),L=e("meta[name=csrf-param]").attr("content");L&&A&&(m.extraData=m.extraData||{},m.extraData[L]=A),m.forceSync?o():setTimeout(o,10);var E,M,F,O=50,X=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},C=e.parseJSON||function(e){return window.eval("("+e+")")},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=C(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var u,l,c,f=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),u=t.type||this.attr2("method"),l=t.url||this.attr2("action"),c="string"==typeof l?e.trim(l):"",c=c||window.location.href||"",c&&(c=(c.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:c,success:e.ajaxSettings.success,type:u||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var p=t.traditional;void 0===p&&(p=e.ajaxSettings.traditional);var d,h=[],v=this.formToArray(t.semantic,h);if(t.data&&(t.extraData=t.data,d=e.param(t.data,p)),t.beforeSubmit&&t.beforeSubmit(v,this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[v,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var g=e.param(v,p);d&&(g=g?g+"&"+d:d),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+g,t.data=null):t.data=g;var x=[];if(t.resetForm&&x.push(function(){f.resetForm()}),t.clearForm&&x.push(function(){f.clearForm(t.includeHidden)}),!t.dataType&&t.target){var b=t.success||function(){};x.push(function(r){var a=t.replaceTarget?"replaceWith":"html";e(t.target)[a](r).each(b,arguments)})}else t.success&&x.push(t.success);if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=x.length;o>i;i++)x[i].apply(n,[e,r,a||f,f])},t.error){var y=t.error;t.error=function(e,r,a){var n=t.context||this;y.apply(n,[e,r,a,f])}}if(t.complete){var T=t.complete;t.complete=function(e,r){var a=t.context||this;T.apply(a,[e,r,f])}}var j=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}),w=j.length>0,S="multipart/form-data",D=f.attr("enctype")==S||f.attr("encoding")==S,k=n.fileapi&&n.formdata;a("fileAPI :"+k);var A,L=(w||D)&&!k;t.iframe!==!1&&(t.iframe||L)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){A=s(v)}):A=s(v):A=(w||D)&&k?o(v):e.ajax(t),f.removeData("jqxhr").data("jqxhr",A);for(var E=0;h.length>E;E++)h[E]=null;return this.trigger("form-submit-notify",[this,t]),this},e.fn.ajaxForm=function(n){if(n=n||{},n.delegation=n.delegation&&e.isFunction(e.fn.on),!n.delegation&&0===this.length){var i={s:this.selector,c:this.context};return!e.isReady&&i.s?(a("DOM not ready, queuing ajaxForm"),e(function(){e(i.s,i.c).ajaxForm(n)}),this):(a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return n.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,n,t).on("click.form-plugin",this.selector,n,r),this):this.ajaxFormUnbind().bind("submit.form-plugin",n,t).bind("click.form-plugin",n,r)},e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r){var a=[];if(0===this.length)return a;var i=this[0],o=t?i.getElementsByTagName("*"):i.elements;if(!o)return a;var s,u,l,c,f,m,p;for(s=0,m=o.length;m>s;s++)if(f=o[s],l=f.name,l&&!f.disabled)if(t&&i.clk&&"image"==f.type)i.clk==f&&(a.push({name:l,value:e(f).val(),type:f.type}),a.push({name:l+".x",value:i.clk_x},{name:l+".y",value:i.clk_y}));else if(c=e.fieldValue(f,!0),c&&c.constructor==Array)for(r&&r.push(f),u=0,p=c.length;p>u;u++)a.push({name:l,value:c[u]});else if(n.fileapi&&"file"==f.type){r&&r.push(f);var d=f.files;if(d.length)for(u=0;d.length>u;u++)a.push({name:l,value:d[u],type:f.type});else a.push({name:l,value:"",type:f.type})}else null!==c&&c!==void 0&&(r&&r.push(f),a.push({name:l,value:c,type:f.type,required:f.required}));if(!t&&i.clk){var h=e(i.clk),v=h[0];l=v.name,l&&!v.disabled&&"image"==v.type&&(a.push({name:l,value:h.val()}),a.push({name:l+".x",value:i.clk_x},{name:l+".y",value:i.clk_y}))}return a},e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var r=[];return this.each(function(){var a=this.name;if(a){var n=e.fieldValue(this,t);if(n&&n.constructor==Array)for(var i=0,o=n.length;o>i;i++)r.push({name:a,value:n[i]});else null!==n&&n!==void 0&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;n>a;a++){var i=this[a],o=e.fieldValue(i,t);null===o||void 0===o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,n=t.type,i=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!t.checked||("submit"==n||"image"==n)&&t.form&&t.form.clk!=t||"select"==i&&-1==t.selectedIndex))return null;if("select"==i){var o=t.selectedIndex;if(0>o)return null;for(var s=[],u=t.options,l="select-one"==n,c=l?o+1:u.length,f=l?o:0;c>f;f++){var m=u[f];if(m.selected){var p=m.value;if(p||(p=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),l)return p;s.push(p)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"==n?this.value="":"checkbox"==a||"radio"==a?this.checked=!1:"select"==n?this.selectedIndex=-1:"file"==a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(t===!0&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"==r||"radio"==r)this.checked=t;else if("option"==this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"==a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1})("undefined"!=typeof jQuery?jQuery:window.Zepto);
1
  /*
2
+ * jQuery Form Plugin; v20131121
3
  * http://jquery.malsup.com/form/
4
  * Copyright (c) 2013 M. Alsup; Dual licensed: MIT/GPL
5
  * https://github.com/malsup/form#copyright-and-license
6
  */
7
+ ;(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)})(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=this;if(i.clk=r,"image"==r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n={};n.fileapi=void 0!==e("<input type='file'/>").get(0).files,n.formdata=void 0!==window.FormData;var i=!!e.fn.prop;e.fn.attr2=function(){if(!i)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function r(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;o>a;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function o(a){for(var n=new FormData,i=0;a.length>i;i++)n.append(a[i].name,a[i].value);if(t.extraData){var o=r(t.extraData);for(i=0;o.length>i;i++)o[i]&&n.append(o[i][0],o[i][1])}t.data=null;var s=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:u||"POST"});t.uploadProgress&&(s.xhr=function(){var r=e.ajaxSettings.xhr();return r.upload&&r.upload.addEventListener("progress",function(e){var r=0,a=e.loaded||e.position,n=e.total;e.lengthComputable&&(r=Math.ceil(100*(a/n))),t.uploadProgress(e,a,n,r)},!1),r}),s.data=null;var c=s.beforeSend;return s.beforeSend=function(e,r){r.data=t.formData?t.formData:n,c&&c.call(this,e,r)},e.ajax(s)}function s(r){function n(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(r){a("cannot get iframe.contentWindow document: "+r)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(r){a("cannot get iframe.contentDocument: "+r),t=e.document}return t}function o(){function t(){try{var e=n(g).readyState;a("state = "+e),e&&"uninitialized"==e.toLowerCase()&&setTimeout(t,50)}catch(r){a("Server abort: ",r," (",r.name,")"),s(k),j&&clearTimeout(j),j=void 0}}var r=f.attr2("target"),i=f.attr2("action");w.setAttribute("target",p),(!u||/post/i.test(u))&&w.setAttribute("method","POST"),i!=m.url&&w.setAttribute("action",m.url),m.skipEncodingOverride||u&&!/post/i.test(u)||f.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),m.timeout&&(j=setTimeout(function(){T=!0,s(D)},m.timeout));var o=[];try{if(m.extraData)for(var c in m.extraData)m.extraData.hasOwnProperty(c)&&(e.isPlainObject(m.extraData[c])&&m.extraData[c].hasOwnProperty("name")&&m.extraData[c].hasOwnProperty("value")?o.push(e('<input type="hidden" name="'+m.extraData[c].name+'">').val(m.extraData[c].value).appendTo(w)[0]):o.push(e('<input type="hidden" name="'+c+'">').val(m.extraData[c]).appendTo(w)[0]));m.iframeTarget||v.appendTo("body"),g.attachEvent?g.attachEvent("onload",s):g.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(l){var d=document.createElement("form").submit;d.apply(w)}}finally{w.setAttribute("action",i),r?w.setAttribute("target",r):f.removeAttr("target"),e(o).remove()}}function s(t){if(!x.aborted&&!F){if(M=n(g),M||(a("cannot access response document"),t=k),t===D&&x)return x.abort("timeout"),S.reject(x,"timeout"),void 0;if(t==k&&x)return x.abort("server abort"),S.reject(x,"error","server abort"),void 0;if(M&&M.location.href!=m.iframeSrc||T){g.detachEvent?g.detachEvent("onload",s):g.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"==m.dataType||M.XMLDocument||e.isXMLDoc(M);if(a("isXml="+o),!o&&window.opera&&(null===M.body||!M.body.innerHTML)&&--O)return a("requeing onLoad callback, DOM not available"),setTimeout(s,250),void 0;var u=M.body?M.body:M.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=M.XMLDocument?M.XMLDocument:M,o&&(m.dataType="xml"),x.getResponseHeader=function(e){var t={"content-type":m.dataType};return t[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(m.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||m.textarea){var f=M.getElementsByTagName("textarea")[0];if(f)x.responseText=f.value,x.status=Number(f.getAttribute("status"))||x.status,x.statusText=f.getAttribute("statusText")||x.statusText;else if(l){var p=M.getElementsByTagName("pre")[0],h=M.getElementsByTagName("body")[0];p?x.responseText=p.textContent?p.textContent:p.innerText:h&&(x.responseText=h.textContent?h.textContent:h.innerText)}}else"xml"==c&&!x.responseXML&&x.responseText&&(x.responseXML=X(x.responseText));try{E=_(x,c,m)}catch(b){i="parsererror",x.error=r=b||i}}catch(b){a("error caught: ",b),i="error",x.error=r=b||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&300>x.status||304===x.status?"success":"error"),"success"===i?(m.success&&m.success.call(m.context,E,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,m])):i&&(void 0===r&&(r=x.statusText),m.error&&m.error.call(m.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,m,r])),d&&e.event.trigger("ajaxComplete",[x,m]),d&&!--e.active&&e.event.trigger("ajaxStop"),m.complete&&m.complete.call(m.context,x,i),F=!0,m.timeout&&clearTimeout(j),setTimeout(function(){m.iframeTarget?v.attr("src",m.iframeSrc):v.remove(),x.responseXML=null},100)}}}var c,l,m,d,p,v,g,x,b,y,T,j,w=f[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(l=0;h.length>l;l++)c=e(h[l]),i?c.prop("disabled",!1):c.removeAttr("disabled");if(m=e.extend(!0,{},e.ajaxSettings,t),m.context=m.context||m,p="jqFormIO"+(new Date).getTime(),m.iframeTarget?(v=e(m.iframeTarget),y=v.attr2("name"),y?p=y:v.attr2("name",p)):(v=e('<iframe name="'+p+'" src="'+m.iframeSrc+'" />'),v.css({position:"absolute",top:"-1000px",left:"-1000px"})),g=v[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{g.contentWindow.document.execCommand&&g.contentWindow.document.execCommand("Stop")}catch(n){}v.attr("src",m.iframeSrc),x.error=r,m.error&&m.error.call(m.context,x,r,t),d&&e.event.trigger("ajaxError",[x,m,r]),m.complete&&m.complete.call(m.context,x,r)}},d=m.global,d&&0===e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,m]),m.beforeSend&&m.beforeSend.call(m.context,x,m)===!1)return m.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;b=w.clk,b&&(y=b.name,y&&!b.disabled&&(m.extraData=m.extraData||{},m.extraData[y]=b.value,"image"==b.type&&(m.extraData[y+".x"]=w.clk_x,m.extraData[y+".y"]=w.clk_y)));var D=1,k=2,A=e("meta[name=csrf-token]").attr("content"),L=e("meta[name=csrf-param]").attr("content");L&&A&&(m.extraData=m.extraData||{},m.extraData[L]=A),m.forceSync?o():setTimeout(o,10);var E,M,F,O=50,X=e.parseXML||function(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},C=e.parseJSON||function(e){return window.eval("("+e+")")},_=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i="xml"===r||!r&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&("json"===r||!r&&n.indexOf("json")>=0?o=C(o):("script"===r||!r&&n.indexOf("javascript")>=0)&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var u,c,l,f=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),u=t.type||this.attr2("method"),c=t.url||this.attr2("action"),l="string"==typeof c?e.trim(c):"",l=l||window.location.href||"",l&&(l=(l.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:l,success:e.ajaxSettings.success,type:u||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&t.beforeSerialize(this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var d=t.traditional;void 0===d&&(d=e.ajaxSettings.traditional);var p,h=[],v=this.formToArray(t.semantic,h);if(t.data&&(t.extraData=t.data,p=e.param(t.data,d)),t.beforeSubmit&&t.beforeSubmit(v,this,t)===!1)return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[v,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var g=e.param(v,d);p&&(g=g?g+"&"+p:p),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+g,t.data=null):t.data=g;var x=[];if(t.resetForm&&x.push(function(){f.resetForm()}),t.clearForm&&x.push(function(){f.clearForm(t.includeHidden)}),!t.dataType&&t.target){var b=t.success||function(){};x.push(function(r){var a=t.replaceTarget?"replaceWith":"html";e(t.target)[a](r).each(b,arguments)})}else t.success&&x.push(t.success);if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=x.length;o>i;i++)x[i].apply(n,[e,r,a||f,f])},t.error){var y=t.error;t.error=function(e,r,a){var n=t.context||this;y.apply(n,[e,r,a,f])}}if(t.complete){var T=t.complete;t.complete=function(e,r){var a=t.context||this;T.apply(a,[e,r,f])}}var j=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}),w=j.length>0,S="multipart/form-data",D=f.attr("enctype")==S||f.attr("encoding")==S,k=n.fileapi&&n.formdata;a("fileAPI :"+k);var A,L=(w||D)&&!k;t.iframe!==!1&&(t.iframe||L)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){A=s(v)}):A=s(v):A=(w||D)&&k?o(v):e.ajax(t),f.removeData("jqxhr").data("jqxhr",A);for(var E=0;h.length>E;E++)h[E]=null;return this.trigger("form-submit-notify",[this,t]),this},e.fn.ajaxForm=function(n){if(n=n||{},n.delegation=n.delegation&&e.isFunction(e.fn.on),!n.delegation&&0===this.length){var i={s:this.selector,c:this.context};return!e.isReady&&i.s?(a("DOM not ready, queuing ajaxForm"),e(function(){e(i.s,i.c).ajaxForm(n)}),this):(a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return n.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,n,t).on("click.form-plugin",this.selector,n,r),this):this.ajaxFormUnbind().bind("submit.form-plugin",n,t).bind("click.form-plugin",n,r)},e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r){var a=[];if(0===this.length)return a;var i=this[0],o=t?i.getElementsByTagName("*"):i.elements;if(!o)return a;var s,u,c,l,f,m,d;for(s=0,m=o.length;m>s;s++)if(f=o[s],c=f.name,c&&!f.disabled)if(t&&i.clk&&"image"==f.type)i.clk==f&&(a.push({name:c,value:e(f).val(),type:f.type}),a.push({name:c+".x",value:i.clk_x},{name:c+".y",value:i.clk_y}));else if(l=e.fieldValue(f,!0),l&&l.constructor==Array)for(r&&r.push(f),u=0,d=l.length;d>u;u++)a.push({name:c,value:l[u]});else if(n.fileapi&&"file"==f.type){r&&r.push(f);var p=f.files;if(p.length)for(u=0;p.length>u;u++)a.push({name:c,value:p[u],type:f.type});else a.push({name:c,value:"",type:f.type})}else null!==l&&l!==void 0&&(r&&r.push(f),a.push({name:c,value:l,type:f.type,required:f.required}));if(!t&&i.clk){var h=e(i.clk),v=h[0];c=v.name,c&&!v.disabled&&"image"==v.type&&(a.push({name:c,value:h.val()}),a.push({name:c+".x",value:i.clk_x},{name:c+".y",value:i.clk_y}))}return a},e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var r=[];return this.each(function(){var a=this.name;if(a){var n=e.fieldValue(this,t);if(n&&n.constructor==Array)for(var i=0,o=n.length;o>i;i++)r.push({name:a,value:n[i]});else null!==n&&n!==void 0&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;n>a;a++){var i=this[a],o=e.fieldValue(i,t);null===o||void 0===o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,n=t.type,i=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"==n||"button"==n||("checkbox"==n||"radio"==n)&&!t.checked||("submit"==n||"image"==n)&&t.form&&t.form.clk!=t||"select"==i&&-1==t.selectedIndex))return null;if("select"==i){var o=t.selectedIndex;if(0>o)return null;for(var s=[],u=t.options,c="select-one"==n,l=c?o+1:u.length,f=c?o:0;l>f;f++){var m=u[f];if(m.selected){var d=m.value;if(d||(d=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),c)return d;s.push(d)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"==n?this.value="":"checkbox"==a||"radio"==a?this.checked=!1:"select"==n?this.selectedIndex=-1:"file"==a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(t===!0&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"==r||"radio"==r)this.checked=t;else if("option"==this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"==a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1});
includes/js/scripts.js CHANGED
@@ -1,143 +1,140 @@
1
  (function($) {
2
 
3
- $(function() {
4
- try {
5
- if (typeof _wpcf7 == 'undefined' || _wpcf7 === null)
6
- _wpcf7 = {};
7
-
8
- _wpcf7 = $.extend({ cached: 0 }, _wpcf7);
9
-
10
- _wpcf7.supportHtml5 = $.wpcf7SupportHtml5();
11
 
12
- $('div.wpcf7 > form').ajaxForm({
13
- beforeSubmit: function(formData, jqForm, options) {
14
- jqForm.wpcf7ClearResponseOutput();
15
- jqForm.find('img.ajax-loader').css({ visibility: 'visible' });
16
- return true;
17
- },
18
- beforeSerialize: function(jqForm, options) {
19
- jqForm.find('[placeholder].placeheld').each(function(i, n) {
20
- $(n).val('');
21
- });
22
- return true;
23
- },
24
- data: { '_wpcf7_is_ajax_call': 1 },
25
- dataType: 'json',
26
- success: function(data) {
27
- if (! $.isPlainObject(data) || $.isEmptyObject(data))
28
- return;
29
 
30
- var ro = $(data.into).find('div.wpcf7-response-output');
31
- $(data.into).wpcf7ClearResponseOutput();
 
 
32
 
33
- $(data.into).find('.wpcf7-form-control').removeClass('wpcf7-not-valid');
34
- $(data.into).find('form.wpcf7-form').removeClass('invalid spam sent failed');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
- if (data.captcha)
37
- $(data.into).wpcf7RefillCaptcha(data.captcha);
38
 
39
- if (data.quiz)
40
- $(data.into).wpcf7RefillQuiz(data.quiz);
41
 
42
- if (data.invalids) {
43
- $.each(data.invalids, function(i, n) {
44
- $(data.into).find(n.into).wpcf7NotValidTip(n.message);
45
- $(data.into).find(n.into).find('.wpcf7-form-control').addClass('wpcf7-not-valid');
46
- });
47
 
48
- ro.addClass('wpcf7-validation-errors');
49
- $(data.into).find('form.wpcf7-form').addClass('invalid');
 
50
 
51
- $(data.into).trigger('invalid.wpcf7');
52
 
53
- } else if (1 == data.spam) {
54
- ro.addClass('wpcf7-spam-blocked');
55
- $(data.into).find('form.wpcf7-form').addClass('spam');
56
 
57
- $(data.into).trigger('spam.wpcf7');
 
 
 
 
 
 
 
 
58
 
59
- } else if (1 == data.mailSent) {
60
- ro.addClass('wpcf7-mail-sent-ok');
61
- $(data.into).find('form.wpcf7-form').addClass('sent');
 
 
 
 
 
 
 
62
 
63
- if (data.onSentOk)
64
- $.each(data.onSentOk, function(i, n) { eval(n) });
 
65
 
66
- $(data.into).trigger('mailsent.wpcf7');
67
 
68
- } else {
69
- ro.addClass('wpcf7-mail-sent-ng');
70
- $(data.into).find('form.wpcf7-form').addClass('failed');
71
 
72
- $(data.into).trigger('mailfailed.wpcf7');
73
- }
74
 
75
- if (data.onSubmit)
76
- $.each(data.onSubmit, function(i, n) { eval(n) });
77
 
78
- $(data.into).trigger('submit.wpcf7');
 
79
 
80
- if (1 == data.mailSent)
81
- $(data.into).find('form').resetForm().clearForm();
 
 
 
 
82
 
83
- $(data.into).find('[placeholder].placeheld').each(function(i, n) {
84
- $(n).val($(n).attr('placeholder'));
85
- });
86
 
87
- $(data.into).wpcf7FillResponseOutput(data.message);
88
- },
89
- error: function(xhr, status, error, $form) {
90
- var e = $('<div class="ajax-error"></div>').text(error.message);
91
- $form.after(e);
92
- }
93
- });
94
 
95
- $('div.wpcf7 > form').wpcf7InitForm();
 
 
96
 
97
- } catch (e) {
98
- }
99
- });
100
 
101
- $.fn.wpcf7InitForm = function() {
102
- return this.each(function(i, n) {
103
- var $f = $(n);
104
 
105
- if (_wpcf7.cached)
106
- $f.wpcf7OnloadRefill();
107
 
108
- $f.wpcf7ToggleSubmit();
109
 
110
- $f.find('.wpcf7-submit').wpcf7AjaxLoader();
 
 
111
 
112
- $f.find('.wpcf7-acceptance').click(function() {
113
- $f.wpcf7ToggleSubmit();
114
- });
115
 
116
- $f.find('.wpcf7-exclusive-checkbox').wpcf7ExclusiveCheckbox();
 
117
 
118
- $f.find('[placeholder]').wpcf7Placeholder();
119
 
120
- if (_wpcf7.jqueryUi && ! _wpcf7.supportHtml5.date) {
121
- $f.find('input.wpcf7-date[type="date"]').each(function() {
122
- $(this).datepicker({
123
- dateFormat: 'yy-mm-dd',
124
- minDate: new Date($(this).attr('min')),
125
- maxDate: new Date($(this).attr('max'))
126
- });
127
- });
128
- }
129
 
130
- if (_wpcf7.jqueryUi && ! _wpcf7.supportHtml5.number) {
131
- $f.find('input.wpcf7-number[type="number"]').each(function() {
132
- $(this).spinner({
133
- min: $(this).attr('min'),
134
- max: $(this).attr('max'),
135
- step: $(this).attr('step')
136
- });
137
- });
138
- }
139
  });
140
- };
 
 
 
141
 
142
  $.fn.wpcf7ExclusiveCheckbox = function() {
143
  return this.find('input:checkbox').click(function() {
@@ -205,16 +202,7 @@
205
  $.fn.wpcf7NotValidTip = function(message) {
206
  return this.each(function() {
207
  var into = $(this);
208
- into.append('<span class="wpcf7-not-valid-tip">' + message + '</span>');
209
- $('span.wpcf7-not-valid-tip').mouseover(function() {
210
- $(this).fadeOut('fast');
211
- });
212
- into.find(':input').mouseover(function() {
213
- into.find('.wpcf7-not-valid-tip').not(':hidden').fadeOut('fast');
214
- });
215
- into.find(':input').focus(function() {
216
- into.find('.wpcf7-not-valid-tip').not(':hidden').fadeOut('fast');
217
- });
218
  });
219
  };
220
 
@@ -267,18 +255,12 @@
267
 
268
  $.fn.wpcf7ClearResponseOutput = function() {
269
  return this.each(function() {
270
- $(this).find('div.wpcf7-response-output').hide().empty().removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked');
271
  $(this).find('span.wpcf7-not-valid-tip').remove();
272
  $(this).find('img.ajax-loader').css({ visibility: 'hidden' });
273
  });
274
  };
275
 
276
- $.fn.wpcf7FillResponseOutput = function(message) {
277
- return this.each(function() {
278
- $(this).find('div.wpcf7-response-output').append(message).slideDown('fast');
279
- });
280
- };
281
-
282
  $.wpcf7SupportHtml5 = function() {
283
  var features = {};
284
  var input = document.createElement('input');
1
  (function($) {
2
 
3
+ if (typeof _wpcf7 == 'undefined' || _wpcf7 === null)
4
+ _wpcf7 = {};
 
 
 
 
 
 
5
 
6
+ _wpcf7 = $.extend({ cached: 0 }, _wpcf7);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
+ $(function() {
9
+ _wpcf7.supportHtml5 = $.wpcf7SupportHtml5();
10
+ $('div.wpcf7 > form').wpcf7InitForm();
11
+ });
12
 
13
+ $.fn.wpcf7InitForm = function() {
14
+ this.ajaxForm({
15
+ beforeSubmit: function(arr, $form, options) {
16
+ $form.wpcf7ClearResponseOutput();
17
+ $form.find('[aria-invalid]').attr('aria-invalid', 'false');
18
+ $form.find('img.ajax-loader').css({ visibility: 'visible' });
19
+ return true;
20
+ },
21
+ beforeSerialize: function($form, options) {
22
+ $form.find('[placeholder].placeheld').each(function(i, n) {
23
+ $(n).val('');
24
+ });
25
+ return true;
26
+ },
27
+ data: { '_wpcf7_is_ajax_call': 1 },
28
+ dataType: 'json',
29
+ success: $.wpcf7AjaxSuccess,
30
+ error: function(xhr, status, error, $form) {
31
+ var e = $('<div class="ajax-error"></div>').text(error.message);
32
+ $form.after(e);
33
+ }
34
+ });
35
 
36
+ if (_wpcf7.cached)
37
+ this.wpcf7OnloadRefill();
38
 
39
+ this.wpcf7ToggleSubmit();
 
40
 
41
+ this.find('.wpcf7-submit').wpcf7AjaxLoader();
 
 
 
 
42
 
43
+ this.find('.wpcf7-acceptance').click(function() {
44
+ $(this).closest('form').wpcf7ToggleSubmit();
45
+ });
46
 
47
+ this.find('.wpcf7-exclusive-checkbox').wpcf7ExclusiveCheckbox();
48
 
49
+ this.find('[placeholder]').wpcf7Placeholder();
 
 
50
 
51
+ if (_wpcf7.jqueryUi && ! _wpcf7.supportHtml5.date) {
52
+ this.find('input.wpcf7-date[type="date"]').each(function() {
53
+ $(this).datepicker({
54
+ dateFormat: 'yy-mm-dd',
55
+ minDate: new Date($(this).attr('min')),
56
+ maxDate: new Date($(this).attr('max'))
57
+ });
58
+ });
59
+ }
60
 
61
+ if (_wpcf7.jqueryUi && ! _wpcf7.supportHtml5.number) {
62
+ this.find('input.wpcf7-number[type="number"]').each(function() {
63
+ $(this).spinner({
64
+ min: $(this).attr('min'),
65
+ max: $(this).attr('max'),
66
+ step: $(this).attr('step')
67
+ });
68
+ });
69
+ }
70
+ };
71
 
72
+ $.wpcf7AjaxSuccess = function(data, status, xhr, $form) {
73
+ if (! $.isPlainObject(data) || $.isEmptyObject(data))
74
+ return;
75
 
76
+ var $responseOutput = $form.find('div.wpcf7-response-output');
77
 
78
+ $form.wpcf7ClearResponseOutput();
 
 
79
 
80
+ $form.find('.wpcf7-form-control').removeClass('wpcf7-not-valid');
81
+ $form.removeClass('invalid spam sent failed');
82
 
83
+ if (data.captcha)
84
+ $form.wpcf7RefillCaptcha(data.captcha);
85
 
86
+ if (data.quiz)
87
+ $form.wpcf7RefillQuiz(data.quiz);
88
 
89
+ if (data.invalids) {
90
+ $.each(data.invalids, function(i, n) {
91
+ $form.find(n.into).wpcf7NotValidTip(n.message);
92
+ $form.find(n.into).find('.wpcf7-form-control').addClass('wpcf7-not-valid');
93
+ $form.find(n.into).find('[aria-invalid]').attr('aria-invalid', 'true');
94
+ });
95
 
96
+ $responseOutput.addClass('wpcf7-validation-errors');
97
+ $form.addClass('invalid');
 
98
 
99
+ $(data.into).trigger('invalid.wpcf7');
 
 
 
 
 
 
100
 
101
+ } else if (1 == data.spam) {
102
+ $responseOutput.addClass('wpcf7-spam-blocked');
103
+ $form.addClass('spam');
104
 
105
+ $(data.into).trigger('spam.wpcf7');
 
 
106
 
107
+ } else if (1 == data.mailSent) {
108
+ $responseOutput.addClass('wpcf7-mail-sent-ok');
109
+ $form.addClass('sent');
110
 
111
+ if (data.onSentOk)
112
+ $.each(data.onSentOk, function(i, n) { eval(n) });
113
 
114
+ $(data.into).trigger('mailsent.wpcf7');
115
 
116
+ } else {
117
+ $responseOutput.addClass('wpcf7-mail-sent-ng');
118
+ $form.addClass('failed');
119
 
120
+ $(data.into).trigger('mailfailed.wpcf7');
121
+ }
 
122
 
123
+ if (data.onSubmit)
124
+ $.each(data.onSubmit, function(i, n) { eval(n) });
125
 
126
+ $(data.into).trigger('submit.wpcf7');
127
 
128
+ if (1 == data.mailSent)
129
+ $form.resetForm().clearForm();
 
 
 
 
 
 
 
130
 
131
+ $form.find('[placeholder].placeheld').each(function(i, n) {
132
+ $(n).val($(n).attr('placeholder'));
 
 
 
 
 
 
 
133
  });
134
+
135
+ $responseOutput.append(data.message).slideDown('fast');
136
+ $responseOutput.attr('role', 'alert');
137
+ }
138
 
139
  $.fn.wpcf7ExclusiveCheckbox = function() {
140
  return this.find('input:checkbox').click(function() {
202
  $.fn.wpcf7NotValidTip = function(message) {
203
  return this.each(function() {
204
  var into = $(this);
205
+ into.hide().append('<span role="alert" class="wpcf7-not-valid-tip">' + message + '</span>').slideDown('fast');
 
 
 
 
 
 
 
 
 
206
  });
207
  };
208
 
255
 
256
  $.fn.wpcf7ClearResponseOutput = function() {
257
  return this.each(function() {
258
+ $(this).find('div.wpcf7-response-output').hide().empty().removeClass('wpcf7-mail-sent-ok wpcf7-mail-sent-ng wpcf7-validation-errors wpcf7-spam-blocked').removeAttr('role');
259
  $(this).find('span.wpcf7-not-valid-tip').remove();
260
  $(this).find('img.ajax-loader').css({ visibility: 'hidden' });
261
  });
262
  };
263
 
 
 
 
 
 
 
264
  $.wpcf7SupportHtml5 = function() {
265
  var features = {};
266
  var input = document.createElement('input');
includes/upgrade.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ add_action( 'wpcf7_upgrade', 'wpcf7_convert_to_cpt', 10, 2 );
4
+
5
+ function wpcf7_convert_to_cpt( $new_ver, $old_ver ) {
6
+ global $wpdb;
7
+
8
+ if ( ! version_compare( $old_ver, '3.0-dev', '<' ) )
9
+ return;
10
+
11
+ $old_rows = array();
12
+
13
+ $table_name = $wpdb->prefix . "contact_form_7";
14
+
15
+ if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) ) {
16
+ $old_rows = $wpdb->get_results( "SELECT * FROM $table_name" );
17
+ } elseif ( ( $opt = get_option( 'wpcf7' ) ) && ! empty( $opt['contact_forms'] ) ) {
18
+ foreach ( (array) $opt['contact_forms'] as $key => $value ) {
19
+ $old_rows[] = (object) array_merge( $value, array( 'cf7_unit_id' => $key ) );
20
+ }
21
+ }
22
+
23
+ foreach ( (array) $old_rows as $row ) {
24
+ $q = "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_old_cf7_unit_id'"
25
+ . $wpdb->prepare( " AND meta_value = %d", $row->cf7_unit_id );
26
+
27
+ if ( $wpdb->get_var( $q ) )
28
+ continue;
29
+
30
+ $postarr = array(
31
+ 'post_type' => 'wpcf7_contact_form',
32
+ 'post_status' => 'publish',
33
+ 'post_title' => maybe_unserialize( $row->title ) );
34
+
35
+ $post_id = wp_insert_post( $postarr );
36
+
37
+ if ( $post_id ) {
38
+ update_post_meta( $post_id, '_old_cf7_unit_id', $row->cf7_unit_id );
39
+
40
+ $metas = array( 'form', 'mail', 'mail_2', 'messages', 'additional_settings' );
41
+
42
+ foreach ( $metas as $meta ) {
43
+ update_post_meta( $post_id, '_' . $meta,
44
+ wpcf7_normalize_newline_deep( maybe_unserialize( $row->{$meta} ) ) );
45
+ }
46
+ }
47
+ }
48
+ }
49
+
50
+ add_action( 'wpcf7_upgrade', 'wpcf7_prepend_underscore', 10, 2 );
51
+
52
+ function wpcf7_prepend_underscore( $new_ver, $old_ver ) {
53
+ if ( version_compare( $old_ver, '3.0-dev', '<' ) )
54
+ return;
55
+
56
+ if ( ! version_compare( $old_ver, '3.3-dev', '<' ) )
57
+ return;
58
+
59
+ $posts = WPCF7_ContactForm::find( array(
60
+ 'post_status' => 'any',
61
+ 'posts_per_page' => -1 ) );
62
+
63
+ foreach ( $posts as $post ) {
64
+ $props = $post->get_properties();
65
+
66
+ foreach ( $props as $prop => $value ) {
67
+ if ( metadata_exists( 'post', $post->id, '_' . $prop ) )
68
+ continue;
69
+
70
+ update_post_meta( $post->id, '_' . $prop, $value );
71
+ delete_post_meta( $post->id, $prop );
72
+ }
73
+ }
74
+ }
75
+
76
+ ?>
languages/{wpcf7-af.mo → contact-form-7-af.mo} RENAMED
File without changes
languages/{wpcf7-ar.mo → contact-form-7-ar.mo} RENAMED
File without changes
languages/{wpcf7-az_AZ.mo → contact-form-7-az_AZ.mo} RENAMED
File without changes
languages/{wpcf7-be_BY.mo → contact-form-7-be_BY.mo} RENAMED
File without changes
languages/{wpcf7-bg_BG.mo → contact-form-7-bg_BG.mo} RENAMED
File without changes
languages/{wpcf7-bn_BD.mo → contact-form-7-bn_BD.mo} RENAMED
File without changes
languages/{wpcf7-bn_IN.mo → contact-form-7-bn_IN.mo} RENAMED
File without changes
languages/{wpcf7-bs.mo → contact-form-7-bs.mo} RENAMED
File without changes
languages/{wpcf7-ca.mo → contact-form-7-ca.mo} RENAMED
File without changes
languages/{wpcf7-ckb.mo → contact-form-7-ckb.mo} RENAMED
File without changes
languages/{wpcf7-cs_CZ.mo → contact-form-7-cs_CZ.mo} RENAMED
File without changes
languages/{wpcf7-da_DK.mo → contact-form-7-da_DK.mo} RENAMED
File without changes
languages/{wpcf7-de_DE.mo → contact-form-7-de_DE.mo} RENAMED
File without changes
languages/{wpcf7-el.mo → contact-form-7-el.mo} RENAMED
File without changes
languages/{wpcf7-eo_EO.mo → contact-form-7-eo_EO.mo} RENAMED
File without changes
languages/{wpcf7-es_ES.mo → contact-form-7-es_ES.mo} RENAMED
File without changes
languages/{wpcf7-et.mo → contact-form-7-et.mo} RENAMED
File without changes
languages/{wpcf7-eu.mo → contact-form-7-eu.mo} RENAMED
File without changes
languages/{wpcf7-fa_IR.mo → contact-form-7-fa_IR.mo} RENAMED
File without changes
languages/{wpcf7-fi.mo → contact-form-7-fi.mo} RENAMED
File without changes
languages/{wpcf7-fr_FR.mo → contact-form-7-fr_FR.mo} RENAMED
Binary file
languages/{wpcf7-ga_IE.mo → contact-form-7-ga_IE.mo} RENAMED
File without changes
languages/{wpcf7-gl_ES.mo → contact-form-7-gl_ES.mo} RENAMED
File without changes
languages/{wpcf7-gu_IN.mo → contact-form-7-gu_IN.mo} RENAMED
File without changes
languages/{wpcf7-he_IL.mo → contact-form-7-he_IL.mo} RENAMED
File without changes
languages/{wpcf7-hi_IN.mo → contact-form-7-hi_IN.mo} RENAMED
File without changes
languages/{wpcf7-hr.mo → contact-form-7-hr.mo} RENAMED
File without changes
languages/{wpcf7-hu_HU.mo → contact-form-7-hu_HU.mo} RENAMED
File without changes
languages/{wpcf7-hy_AM.mo → contact-form-7-hy_AM.mo} RENAMED
File without changes
languages/{wpcf7-id_ID.mo → contact-form-7-id_ID.mo} RENAMED
File without changes
languages/{wpcf7-it_IT.mo → contact-form-7-it_IT.mo} RENAMED
File without changes
languages/contact-form-7-ja.mo ADDED
Binary file
languages/{wpcf7-ka_GE.mo → contact-form-7-ka_GE.mo} RENAMED
File without changes
languages/{wpcf7-ko_KR.mo → contact-form-7-ko_KR.mo} RENAMED
File without changes
languages/{wpcf7-lt_LT.mo → contact-form-7-lt_LT.mo} RENAMED
File without changes
languages/{wpcf7-lv.mo → contact-form-7-lv.mo} RENAMED
File without changes
languages/{wpcf7-mk_MK.mo → contact-form-7-mk_MK.mo} RENAMED
File without changes
languages/{wpcf7-ml_IN.mo → contact-form-7-ml_IN.mo} RENAMED
File without changes
languages/{wpcf7-ms_MY.mo → contact-form-7-ms_MY.mo} RENAMED
File without changes
languages/{wpcf7-mt_MT.mo → contact-form-7-mt_MT.mo} RENAMED
File without changes
languages/{wpcf7-nb_NO.mo → contact-form-7-nb_NO.mo} RENAMED
File without changes
languages/{wpcf7-nl_NL.mo → contact-form-7-nl_NL.mo} RENAMED
File without changes
languages/{wpcf7-pl_PL.mo → contact-form-7-pl_PL.mo} RENAMED
File without changes
languages/contact-form-7-pt_BR.mo ADDED
Binary file
languages/{wpcf7-pt_PT.mo → contact-form-7-pt_PT.mo} RENAMED
File without changes
languages/{wpcf7-ro_RO.mo → contact-form-7-ro_RO.mo} RENAMED
File without changes
languages/{wpcf7-ru_RU.mo → contact-form-7-ru_RU.mo} RENAMED
File without changes
languages/{wpcf7-si_LK.mo → contact-form-7-si_LK.mo} RENAMED
File without changes
languages/{wpcf7-sk_SK.mo → contact-form-7-sk_SK.mo} RENAMED
File without changes
languages/{wpcf7-sl_SI.mo → contact-form-7-sl_SI.mo} RENAMED
File without changes
languages/{wpcf7-sq.mo → contact-form-7-sq.mo} RENAMED
File without changes
languages/{wpcf7-sr_RS.mo → contact-form-7-sr_RS.mo} RENAMED
File without changes
languages/{wpcf7-sv_SE.mo → contact-form-7-sv_SE.mo} RENAMED
File without changes
languages/{wpcf7-ta.mo → contact-form-7-ta.mo} RENAMED
File without changes
languages/{wpcf7-th.mo → contact-form-7-th.mo} RENAMED
File without changes
languages/{wpcf7-tl.mo → contact-form-7-tl.mo} RENAMED
File without changes
languages/{wpcf7-tr_TR.mo → contact-form-7-tr_TR.mo} RENAMED
File without changes
languages/{wpcf7-uk.mo → contact-form-7-uk.mo} RENAMED
File without changes
languages/{wpcf7-vi.mo → contact-form-7-vi.mo} RENAMED
File without changes
languages/{wpcf7-zh_CN.mo → contact-form-7-zh_CN.mo} RENAMED
File without changes
languages/{wpcf7-zh_TW.mo → contact-form-7-zh_TW.mo} RENAMED
File without changes
languages/{wpcf7.pot → contact-form-7.pot} RENAMED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Contact Form 7\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-11-11 23:37+0900\n"
6
- "PO-Revision-Date: 2013-11-11 23:37+0900\n"
7
  "Last-Translator: Takayuki Miyoshi <takayukister@gmail.com>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -20,188 +20,268 @@ msgstr ""
20
  msgid "Just another contact form plugin. Simple but flexible."
21
  msgstr ""
22
 
23
- #: contact-form-7/settings.php:202
24
  #, php-format
25
  msgid "Contact form %d"
26
  msgstr ""
27
 
28
- #: contact-form-7/admin/admin.php:8 contact-form-7/admin/admin.php:259
29
- #: contact-form-7/admin/edit-contact-form.php:12
30
- #: contact-form-7/modules/flamingo.php:14
31
  msgid "Contact Form 7"
32
  msgstr ""
33
 
34
- #: contact-form-7/admin/admin.php:8
35
  msgid "Contact"
36
  msgstr ""
37
 
38
- #: contact-form-7/admin/admin.php:13
39
- msgid "Edit Contact Forms"
 
40
  msgstr ""
41
 
42
- #: contact-form-7/admin/admin.php:13
43
- #: contact-form-7/admin/includes/class-contact-forms-list-table.php:104
44
- msgid "Edit"
45
  msgstr ""
46
 
47
- #: contact-form-7/admin/admin.php:41 contact-form-7/admin/admin.php:114
48
- msgid "You are not allowed to edit this item."
 
49
  msgstr ""
50
 
51
- #: contact-form-7/admin/admin.php:155
52
- msgid "You are not allowed to delete this item."
 
 
53
  msgstr ""
54
 
55
- #: contact-form-7/admin/admin.php:158
56
- msgid "Error in deleting."
57
  msgstr ""
58
 
59
- #: contact-form-7/admin/admin.php:197 contact-form-7/includes/classes.php:27
60
- msgid "Contact Forms"
61
  msgstr ""
62
 
63
- #: contact-form-7/admin/admin.php:234
64
- msgid "Generate Tag"
65
  msgstr ""
66
 
67
- #: contact-form-7/admin/admin.php:261 contact-form-7/admin/admin.php:293
68
- #: contact-form-7/admin/admin.php:306
69
- #: contact-form-7/admin/edit-contact-form.php:15
70
- msgid "Add New"
71
  msgstr ""
72
 
73
- #: contact-form-7/admin/admin.php:265
74
  #, php-format
75
  msgid "Search results for &#8220;%s&#8221;"
76
  msgstr ""
77
 
78
- #: contact-form-7/admin/admin.php:274
79
  msgid "Search Contact Forms"
80
  msgstr ""
81
 
82
- #: contact-form-7/admin/admin.php:292
83
  #, php-format
84
  msgid "Use the default language (%s)"
85
  msgstr ""
86
 
87
- #: contact-form-7/admin/admin.php:296
88
  msgid "Or"
89
  msgstr ""
90
 
91
- #: contact-form-7/admin/admin.php:301
92
  msgid "(select language)"
93
  msgstr ""
94
 
95
- #: contact-form-7/admin/admin.php:313
96
  msgid "Form"
97
  msgstr ""
98
 
99
- #: contact-form-7/admin/admin.php:316
100
  msgid "Mail"
101
  msgstr ""
102
 
103
- #: contact-form-7/admin/admin.php:319
104
  msgid "Mail (2)"
105
  msgstr ""
106
 
107
- #: contact-form-7/admin/admin.php:324
108
  msgid "Use mail (2)"
109
  msgstr ""
110
 
111
- #: contact-form-7/admin/admin.php:326
112
  msgid "Messages"
113
  msgstr ""
114
 
115
- #: contact-form-7/admin/admin.php:329
116
  msgid "Additional Settings"
117
  msgstr ""
118
 
119
- #: contact-form-7/admin/admin.php:360
120
  msgid "Contact form created."
121
  msgstr ""
122
 
123
- #: contact-form-7/admin/admin.php:362
124
  msgid "Contact form saved."
125
  msgstr ""
126
 
127
- #: contact-form-7/admin/admin.php:364
128
  msgid "Contact form deleted."
129
  msgstr ""
130
 
131
- #: contact-form-7/admin/admin.php:381
132
  msgid "Settings"
133
  msgstr ""
134
 
135
- #: contact-form-7/admin/admin.php:392
136
  msgid "http://contactform7.com/docs/"
137
  msgstr ""
138
 
139
- #: contact-form-7/admin/admin.php:393
140
  msgid "Docs"
141
  msgstr ""
142
 
143
- #: contact-form-7/admin/admin.php:394
144
  msgid "http://contactform7.com/faq/"
145
  msgstr ""
146
 
147
- #: contact-form-7/admin/admin.php:395
148
  msgid "FAQ"
149
  msgstr ""
150
 
151
- #: contact-form-7/admin/admin.php:396
152
  msgid "http://contactform7.com/support/"
153
  msgstr ""
154
 
155
- #: contact-form-7/admin/admin.php:397
156
  msgid "Support"
157
  msgstr ""
158
 
159
- #: contact-form-7/admin/admin.php:428
160
- msgid "Contact Form 7 needs your support. Please donate today."
161
- msgstr ""
162
-
163
- #: contact-form-7/admin/admin.php:429
164
- msgid "Your contribution is needed for making this plugin better."
165
- msgstr ""
166
-
167
- #: contact-form-7/admin/admin.php:435
168
  msgid "http://contactform7.com/donate/"
169
  msgstr ""
170
 
171
- #: contact-form-7/admin/admin.php:435
172
  msgid "Donate"
173
  msgstr ""
174
 
175
- #: contact-form-7/admin/admin.php:455
176
  #, php-format
177
  msgid ""
178
  "<strong>Contact Form 7 %1$s requires WordPress %2$s or higher.</strong> "
179
  "Please <a href=\"%3$s\">update WordPress</a> first."
180
  msgstr ""
181
 
182
- #: contact-form-7/admin/edit-contact-form.php:47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  msgid ""
184
  "Copy this code and paste it into your post, page or text widget content."
185
  msgstr ""
186
 
187
- #: contact-form-7/admin/edit-contact-form.php:53
188
  msgid "Old code is also available."
189
  msgstr ""
190
 
191
- #: contact-form-7/admin/edit-contact-form.php:61
192
  msgid "Save"
193
  msgstr ""
194
 
195
- #: contact-form-7/admin/edit-contact-form.php:68
196
  msgid "Duplicate"
197
  msgstr ""
198
 
199
- #: contact-form-7/admin/edit-contact-form.php:73
200
  #: contact-form-7/admin/includes/class-contact-forms-list-table.php:83
201
  msgid "Delete"
202
  msgstr ""
203
 
204
- #: contact-form-7/admin/edit-contact-form.php:75
205
  msgid ""
206
  "You are about to delete this contact form.\n"
207
  " 'Cancel' to stop, 'OK' to delete."
@@ -224,6 +304,10 @@ msgstr ""
224
  msgid "Date"
225
  msgstr ""
226
 
 
 
 
 
227
  #: contact-form-7/admin/includes/class-contact-forms-list-table.php:112
228
  msgid "Copy"
229
  msgstr ""
@@ -274,11 +358,11 @@ msgstr ""
274
  msgid "Message body:"
275
  msgstr ""
276
 
277
- #: contact-form-7/includes/classes.php:28
278
  msgid "Contact Form"
279
  msgstr ""
280
 
281
- #: contact-form-7/includes/classes.php:832
282
  msgid "Untitled"
283
  msgstr ""
284
 
2
  msgstr ""
3
  "Project-Id-Version: Contact Form 7\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-12-09 16:54+0900\n"
6
+ "PO-Revision-Date: 2013-12-09 16:54+0900\n"
7
  "Last-Translator: Takayuki Miyoshi <takayukister@gmail.com>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
20
  msgid "Just another contact form plugin. Simple but flexible."
21
  msgstr ""
22
 
23
+ #: contact-form-7/settings.php:87
24
  #, php-format
25
  msgid "Contact form %d"
26
  msgstr ""
27
 
28
+ #: contact-form-7/admin/admin.php:15 contact-form-7/modules/flamingo.php:98
 
 
29
  msgid "Contact Form 7"
30
  msgstr ""
31
 
32
+ #: contact-form-7/admin/admin.php:16
33
  msgid "Contact"
34
  msgstr ""
35
 
36
+ #: contact-form-7/admin/admin.php:21
37
+ #: contact-form-7/admin/edit-contact-form.php:15
38
+ msgid "Edit Contact Form"
39
  msgstr ""
40
 
41
+ #: contact-form-7/admin/admin.php:22 contact-form-7/admin/admin.php:216
42
+ #: contact-form-7/admin/admin.php:278 contact-form-7/includes/classes.php:28
43
+ msgid "Contact Forms"
44
  msgstr ""
45
 
46
+ #: contact-form-7/admin/admin.php:29 contact-form-7/admin/admin.php:324
47
+ #: contact-form-7/admin/edit-contact-form.php:13
48
+ msgid "Add New Contact Form"
49
  msgstr ""
50
 
51
+ #: contact-form-7/admin/admin.php:30 contact-form-7/admin/admin.php:280
52
+ #: contact-form-7/admin/admin.php:327 contact-form-7/admin/admin.php:339
53
+ #: contact-form-7/admin/edit-contact-form.php:17
54
+ msgid "Add New"
55
  msgstr ""
56
 
57
+ #: contact-form-7/admin/admin.php:59 contact-form-7/admin/admin.php:132
58
+ msgid "You are not allowed to edit this item."
59
  msgstr ""
60
 
61
+ #: contact-form-7/admin/admin.php:173
62
+ msgid "You are not allowed to delete this item."
63
  msgstr ""
64
 
65
+ #: contact-form-7/admin/admin.php:176
66
+ msgid "Error in deleting."
67
  msgstr ""
68
 
69
+ #: contact-form-7/admin/admin.php:253
70
+ msgid "Generate Tag"
 
 
71
  msgstr ""
72
 
73
+ #: contact-form-7/admin/admin.php:284
74
  #, php-format
75
  msgid "Search results for &#8220;%s&#8221;"
76
  msgstr ""
77
 
78
+ #: contact-form-7/admin/admin.php:293
79
  msgid "Search Contact Forms"
80
  msgstr ""
81
 
82
+ #: contact-form-7/admin/admin.php:326
83
  #, php-format
84
  msgid "Use the default language (%s)"
85
  msgstr ""
86
 
87
+ #: contact-form-7/admin/admin.php:330
88
  msgid "Or"
89
  msgstr ""
90
 
91
+ #: contact-form-7/admin/admin.php:334
92
  msgid "(select language)"
93
  msgstr ""
94
 
95
+ #: contact-form-7/admin/admin.php:346
96
  msgid "Form"
97
  msgstr ""
98
 
99
+ #: contact-form-7/admin/admin.php:349
100
  msgid "Mail"
101
  msgstr ""
102
 
103
+ #: contact-form-7/admin/admin.php:352
104
  msgid "Mail (2)"
105
  msgstr ""
106
 
107
+ #: contact-form-7/admin/admin.php:357
108
  msgid "Use mail (2)"
109
  msgstr ""
110
 
111
+ #: contact-form-7/admin/admin.php:359
112
  msgid "Messages"
113
  msgstr ""
114
 
115
+ #: contact-form-7/admin/admin.php:362
116
  msgid "Additional Settings"
117
  msgstr ""
118
 
119
+ #: contact-form-7/admin/admin.php:393
120
  msgid "Contact form created."
121
  msgstr ""
122
 
123
+ #: contact-form-7/admin/admin.php:395
124
  msgid "Contact form saved."
125
  msgstr ""
126
 
127
+ #: contact-form-7/admin/admin.php:397
128
  msgid "Contact form deleted."
129
  msgstr ""
130
 
131
+ #: contact-form-7/admin/admin.php:414
132
  msgid "Settings"
133
  msgstr ""
134
 
135
+ #: contact-form-7/admin/admin.php:425
136
  msgid "http://contactform7.com/docs/"
137
  msgstr ""
138
 
139
+ #: contact-form-7/admin/admin.php:426
140
  msgid "Docs"
141
  msgstr ""
142
 
143
+ #: contact-form-7/admin/admin.php:427
144
  msgid "http://contactform7.com/faq/"
145
  msgstr ""
146
 
147
+ #: contact-form-7/admin/admin.php:428
148
  msgid "FAQ"
149
  msgstr ""
150
 
151
+ #: contact-form-7/admin/admin.php:429
152
  msgid "http://contactform7.com/support/"
153
  msgstr ""
154
 
155
+ #: contact-form-7/admin/admin.php:430
156
  msgid "Support"
157
  msgstr ""
158
 
159
+ #: contact-form-7/admin/admin.php:431 contact-form-7/admin/admin.php:486
 
 
 
 
 
 
 
 
160
  msgid "http://contactform7.com/donate/"
161
  msgstr ""
162
 
163
+ #: contact-form-7/admin/admin.php:432 contact-form-7/admin/admin.php:486
164
  msgid "Donate"
165
  msgstr ""
166
 
167
+ #: contact-form-7/admin/admin.php:454
168
  #, php-format
169
  msgid ""
170
  "<strong>Contact Form 7 %1$s requires WordPress %2$s or higher.</strong> "
171
  "Please <a href=\"%3$s\">update WordPress</a> first."
172
  msgstr ""
173
 
174
+ #: contact-form-7/admin/admin.php:479
175
+ msgid "Dismiss"
176
+ msgstr ""
177
+
178
+ #: contact-form-7/admin/admin.php:484
179
+ msgid "Contact Form 7 Needs Your Support"
180
+ msgstr ""
181
+
182
+ #: contact-form-7/admin/admin.php:485
183
+ msgid ""
184
+ "It is hard to continue development and support for this plugin without "
185
+ "contributions from users like you. If you enjoy using Contact Form 7 and "
186
+ "find it useful, please consider making a donation."
187
+ msgstr ""
188
+
189
+ #: contact-form-7/admin/admin.php:490
190
+ msgid "Get Started"
191
+ msgstr ""
192
+
193
+ #: contact-form-7/admin/admin.php:492
194
+ msgid "http://contactform7.com/getting-started-with-contact-form-7/"
195
+ msgstr ""
196
+
197
+ #: contact-form-7/admin/admin.php:492
198
+ msgid "Getting Started with Contact Form 7"
199
+ msgstr ""
200
+
201
+ #: contact-form-7/admin/admin.php:493
202
+ msgid "http://contactform7.com/admin-screen/"
203
+ msgstr ""
204
+
205
+ #: contact-form-7/admin/admin.php:493
206
+ msgid "Admin Screen"
207
+ msgstr ""
208
+
209
+ #: contact-form-7/admin/admin.php:494
210
+ msgid "http://contactform7.com/tag-syntax/"
211
+ msgstr ""
212
+
213
+ #: contact-form-7/admin/admin.php:494
214
+ msgid "How Tags Work"
215
+ msgstr ""
216
+
217
+ #: contact-form-7/admin/admin.php:495
218
+ msgid "http://contactform7.com/setting-up-mail/"
219
+ msgstr ""
220
+
221
+ #: contact-form-7/admin/admin.php:495
222
+ msgid "Setting Up Mail"
223
+ msgstr ""
224
+
225
+ #: contact-form-7/admin/admin.php:500
226
+ msgid "Did You Know?"
227
+ msgstr ""
228
+
229
+ #: contact-form-7/admin/admin.php:502
230
+ msgid "http://contactform7.com/spam-filtering-with-akismet/"
231
+ msgstr ""
232
+
233
+ #: contact-form-7/admin/admin.php:502
234
+ msgid "Spam Filtering with Akismet"
235
+ msgstr ""
236
+
237
+ #: contact-form-7/admin/admin.php:503
238
+ msgid "http://contactform7.com/save-submitted-messages-with-flamingo/"
239
+ msgstr ""
240
+
241
+ #: contact-form-7/admin/admin.php:503
242
+ msgid "Save Messages with Flamingo"
243
+ msgstr ""
244
+
245
+ #: contact-form-7/admin/admin.php:504
246
+ msgid "http://contactform7.com/selectable-recipient-with-pipes/"
247
+ msgstr ""
248
+
249
+ #: contact-form-7/admin/admin.php:504
250
+ msgid "Selectable Recipient with Pipes"
251
+ msgstr ""
252
+
253
+ #: contact-form-7/admin/admin.php:505
254
+ msgid ""
255
+ "http://contactform7.com/tracking-form-submissions-with-google-analytics/"
256
+ msgstr ""
257
+
258
+ #: contact-form-7/admin/admin.php:505
259
+ msgid "Tracking with Google Analytics"
260
+ msgstr ""
261
+
262
+ #: contact-form-7/admin/edit-contact-form.php:49
263
  msgid ""
264
  "Copy this code and paste it into your post, page or text widget content."
265
  msgstr ""
266
 
267
+ #: contact-form-7/admin/edit-contact-form.php:55
268
  msgid "Old code is also available."
269
  msgstr ""
270
 
271
+ #: contact-form-7/admin/edit-contact-form.php:63
272
  msgid "Save"
273
  msgstr ""
274
 
275
+ #: contact-form-7/admin/edit-contact-form.php:70
276
  msgid "Duplicate"
277
  msgstr ""
278
 
279
+ #: contact-form-7/admin/edit-contact-form.php:75
280
  #: contact-form-7/admin/includes/class-contact-forms-list-table.php:83
281
  msgid "Delete"
282
  msgstr ""
283
 
284
+ #: contact-form-7/admin/edit-contact-form.php:77
285
  msgid ""
286
  "You are about to delete this contact form.\n"
287
  " 'Cancel' to stop, 'OK' to delete."
304
  msgid "Date"
305
  msgstr ""
306
 
307
+ #: contact-form-7/admin/includes/class-contact-forms-list-table.php:104
308
+ msgid "Edit"
309
+ msgstr ""
310
+
311
  #: contact-form-7/admin/includes/class-contact-forms-list-table.php:112
312
  msgid "Copy"
313
  msgstr ""
358
  msgid "Message body:"
359
  msgstr ""
360
 
361
+ #: contact-form-7/includes/classes.php:29
362
  msgid "Contact Form"
363
  msgstr ""
364
 
365
+ #: contact-form-7/includes/classes.php:875
366
  msgid "Untitled"
367
  msgstr ""
368
 
languages/wpcf7-ja.mo DELETED
Binary file
languages/wpcf7-pt_BR.mo DELETED
Binary file
modules/acceptance.php CHANGED
@@ -5,7 +5,7 @@
5
 
6
  /* Shortcode handler */
7
 
8
- add_action( 'init', 'wpcf7_add_shortcode_acceptance', 5 );
9
 
10
  function wpcf7_add_shortcode_acceptance() {
11
  wpcf7_add_shortcode( 'acceptance',
@@ -37,6 +37,8 @@ function wpcf7_acceptance_shortcode_handler( $tag ) {
37
  if ( $tag->has_option( 'default:on' ) )
38
  $atts['checked'] = 'checked';
39
 
 
 
40
  $atts['type'] = 'checkbox';
41
  $atts['name'] = $tag->name;
42
  $atts['value'] = '1';
@@ -135,7 +137,7 @@ function wpcf7_add_tag_generator_acceptance() {
135
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
136
  return;
137
 
138
- wpcf7_add_tag_generator( 'acceptance', __( 'Acceptance', 'wpcf7' ),
139
  'wpcf7-tg-pane-acceptance', 'wpcf7_tg_pane_acceptance' );
140
  }
141
 
@@ -144,28 +146,28 @@ function wpcf7_tg_pane_acceptance( &$contact_form ) {
144
  <div id="wpcf7-tg-pane-acceptance" class="hidden">
145
  <form action="">
146
  <table>
147
- <tr><td><?php echo esc_html( __( 'Name', 'wpcf7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
148
  </table>
149
 
150
  <table>
151
  <tr>
152
- <td><code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
153
  <input type="text" name="id" class="idvalue oneline option" /></td>
154
 
155
- <td><code>class</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
156
  <input type="text" name="class" class="classvalue oneline option" /></td>
157
  </tr>
158
 
159
  <tr>
160
  <td colspan="2">
161
- <br /><input type="checkbox" name="default:on" class="option" />&nbsp;<?php echo esc_html( __( "Make this checkbox checked by default?", 'wpcf7' ) ); ?>
162
- <br /><input type="checkbox" name="invert" class="option" />&nbsp;<?php echo esc_html( __( "Make this checkbox work inversely?", 'wpcf7' ) ); ?>
163
- <br /><span style="font-size: smaller;"><?php echo esc_html( __( "* That means visitor who accepts the term unchecks it.", 'wpcf7' ) ); ?></span>
164
  </td>
165
  </tr>
166
  </table>
167
 
168
- <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?><br /><input type="text" name="acceptance" class="tag" readonly="readonly" onfocus="this.select()" /></div>
169
  </form>
170
  </div>
171
  <?php
5
 
6
  /* Shortcode handler */
7
 
8
+ add_action( 'wpcf7_init', 'wpcf7_add_shortcode_acceptance' );
9
 
10
  function wpcf7_add_shortcode_acceptance() {
11
  wpcf7_add_shortcode( 'acceptance',
37
  if ( $tag->has_option( 'default:on' ) )
38
  $atts['checked'] = 'checked';
39
 
40
+ $atts['aria-invalid'] = $validation_error ? 'true' : 'false';
41
+
42
  $atts['type'] = 'checkbox';
43
  $atts['name'] = $tag->name;
44
  $atts['value'] = '1';
137
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
138
  return;
139
 
140
+ wpcf7_add_tag_generator( 'acceptance', __( 'Acceptance', 'contact-form-7' ),
141
  'wpcf7-tg-pane-acceptance', 'wpcf7_tg_pane_acceptance' );
142
  }
143
 
146
  <div id="wpcf7-tg-pane-acceptance" class="hidden">
147
  <form action="">
148
  <table>
149
+ <tr><td><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
150
  </table>
151
 
152
  <table>
153
  <tr>
154
+ <td><code>id</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
155
  <input type="text" name="id" class="idvalue oneline option" /></td>
156
 
157
+ <td><code>class</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
158
  <input type="text" name="class" class="classvalue oneline option" /></td>
159
  </tr>
160
 
161
  <tr>
162
  <td colspan="2">
163
+ <br /><input type="checkbox" name="default:on" class="option" />&nbsp;<?php echo esc_html( __( "Make this checkbox checked by default?", 'contact-form-7' ) ); ?>
164
+ <br /><input type="checkbox" name="invert" class="option" />&nbsp;<?php echo esc_html( __( "Make this checkbox work inversely?", 'contact-form-7' ) ); ?>
165
+ <br /><span style="font-size: smaller;"><?php echo esc_html( __( "* That means visitor who accepts the term unchecks it.", 'contact-form-7' ) ); ?></span>
166
  </td>
167
  </tr>
168
  </table>
169
 
170
+ <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'contact-form-7' ) ); ?><br /><input type="text" name="acceptance" class="tag" readonly="readonly" onfocus="this.select()" /></div>
171
  </form>
172
  </div>
173
  <?php
modules/captcha.php CHANGED
@@ -5,7 +5,7 @@
5
 
6
  /* Shortcode handler */
7
 
8
- add_action( 'init', 'wpcf7_add_shortcode_captcha', 5 );
9
 
10
  function wpcf7_add_shortcode_captcha() {
11
  wpcf7_add_shortcode( array( 'captchac', 'captchar' ),
@@ -16,7 +16,7 @@ function wpcf7_captcha_shortcode_handler( $tag ) {
16
  $tag = new WPCF7_Shortcode( $tag );
17
 
18
  if ( 'captchac' == $tag->type && ! class_exists( 'ReallySimpleCaptcha' ) )
19
- return '<em>' . __( 'To use CAPTCHA, you need <a href="http://wordpress.org/extend/plugins/really-simple-captcha/">Really Simple CAPTCHA</a> plugin installed.', 'wpcf7' ) . '</em>';
20
 
21
  if ( empty( $tag->name ) )
22
  return '';
@@ -77,6 +77,8 @@ function wpcf7_captcha_shortcode_handler( $tag ) {
77
  $atts['id'] = $tag->get_option( 'id', 'id', true );
78
  $atts['tabindex'] = $tag->get_option( 'tabindex', 'int', true );
79
 
 
 
80
  $value = (string) reset( $tag->values );
81
 
82
  if ( wpcf7_is_posted() )
@@ -173,8 +175,8 @@ add_filter( 'wpcf7_messages', 'wpcf7_captcha_messages' );
173
 
174
  function wpcf7_captcha_messages( $messages ) {
175
  return array_merge( $messages, array( 'captcha_not_match' => array(
176
- 'description' => __( "The code that sender entered does not match the CAPTCHA", 'wpcf7' ),
177
- 'default' => __( 'Your entered code is incorrect.', 'wpcf7' )
178
  ) ) );
179
  }
180
 
@@ -187,7 +189,7 @@ function wpcf7_add_tag_generator_captcha() {
187
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
188
  return;
189
 
190
- wpcf7_add_tag_generator( 'captcha', __( 'CAPTCHA', 'wpcf7' ),
191
  'wpcf7-tg-pane-captcha', 'wpcf7_tg_pane_captcha' );
192
  }
193
 
@@ -198,62 +200,62 @@ function wpcf7_tg_pane_captcha( &$contact_form ) {
198
  <table>
199
 
200
  <?php if ( ! class_exists( 'ReallySimpleCaptcha' ) ) : ?>
201
- <tr><td colspan="2"><strong style="color: #e6255b"><?php echo esc_html( __( "Note: To use CAPTCHA, you need Really Simple CAPTCHA plugin installed.", 'wpcf7' ) ); ?></strong><br /><a href="http://wordpress.org/extend/plugins/really-simple-captcha/">http://wordpress.org/extend/plugins/really-simple-captcha/</a></td></tr>
202
  <?php endif; ?>
203
 
204
- <tr><td><?php echo esc_html( __( 'Name', 'wpcf7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
205
  </table>
206
 
207
  <table class="scope captchac">
208
- <caption><?php echo esc_html( __( "Image settings", 'wpcf7' ) ); ?></caption>
209
 
210
  <tr>
211
- <td><code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
212
  <input type="text" name="id" class="idvalue oneline option" /></td>
213
 
214
- <td><code>class</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
215
  <input type="text" name="class" class="classvalue oneline option" /></td>
216
  </tr>
217
 
218
  <tr>
219
- <td><?php echo esc_html( __( "Foreground color", 'wpcf7' ) ); ?> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
220
  <input type="text" name="fg" class="color oneline option" /></td>
221
 
222
- <td><?php echo esc_html( __( "Background color", 'wpcf7' ) ); ?> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
223
  <input type="text" name="bg" class="color oneline option" /></td>
224
  </tr>
225
 
226
- <tr><td colspan="2"><?php echo esc_html( __( "Image size", 'wpcf7' ) ); ?> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
227
- <input type="checkbox" name="size:s" class="exclusive option" />&nbsp;<?php echo esc_html( __( "Small", 'wpcf7' ) ); ?>&emsp;
228
- <input type="checkbox" name="size:m" class="exclusive option" />&nbsp;<?php echo esc_html( __( "Medium", 'wpcf7' ) ); ?>&emsp;
229
- <input type="checkbox" name="size:l" class="exclusive option" />&nbsp;<?php echo esc_html( __( "Large", 'wpcf7' ) ); ?>
230
  </td></tr>
231
  </table>
232
 
233
  <table class="scope captchar">
234
- <caption><?php echo esc_html( __( "Input field settings", 'wpcf7' ) ); ?></caption>
235
 
236
  <tr>
237
- <td><code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
238
  <input type="text" name="id" class="idvalue oneline option" /></td>
239
 
240
- <td><code>class</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
241
  <input type="text" name="class" class="classvalue oneline option" /></td>
242
  </tr>
243
 
244
  <tr>
245
- <td><code>size</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
246
  <input type="number" name="size" class="numeric oneline option" min="1" /></td>
247
 
248
- <td><code>maxlength</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
249
  <input type="number" name="maxlength" class="numeric oneline option" min="1" /></td>
250
  </tr>
251
  </table>
252
 
253
- <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?>
254
- <br />1) <?php echo esc_html( __( "For image", 'wpcf7' ) ); ?>
255
  <input type="text" name="captchac" class="tag" readonly="readonly" onfocus="this.select()" />
256
- <br />2) <?php echo esc_html( __( "For input field", 'wpcf7' ) ); ?>
257
  <input type="text" name="captchar" class="tag" readonly="readonly" onfocus="this.select()" />
258
  </div>
259
  </form>
@@ -283,13 +285,13 @@ function wpcf7_captcha_display_warning_message() {
283
  wpcf7_init_captcha();
284
 
285
  if ( ! is_dir( $uploads_dir ) || ! wp_is_writable( $uploads_dir ) ) {
286
- $message = sprintf( __( 'This contact form contains CAPTCHA fields, but the temporary folder for the files (%s) does not exist or is not writable. You can create the folder or change its permission manually.', 'wpcf7' ), $uploads_dir );
287
 
288
  echo '<div class="error"><p><strong>' . esc_html( $message ) . '</strong></p></div>';
289
  }
290
 
291
  if ( ! function_exists( 'imagecreatetruecolor' ) || ! function_exists( 'imagettftext' ) ) {
292
- $message = __( 'This contact form contains CAPTCHA fields, but the necessary libraries (GD and FreeType) are not available on your server.', 'wpcf7' );
293
 
294
  echo '<div class="error"><p><strong>' . esc_html( $message ) . '</strong></p></div>';
295
  }
5
 
6
  /* Shortcode handler */
7
 
8
+ add_action( 'wpcf7_init', 'wpcf7_add_shortcode_captcha' );
9
 
10
  function wpcf7_add_shortcode_captcha() {
11
  wpcf7_add_shortcode( array( 'captchac', 'captchar' ),
16
  $tag = new WPCF7_Shortcode( $tag );
17
 
18
  if ( 'captchac' == $tag->type && ! class_exists( 'ReallySimpleCaptcha' ) )
19
+ return '<em>' . __( 'To use CAPTCHA, you need <a href="http://wordpress.org/extend/plugins/really-simple-captcha/">Really Simple CAPTCHA</a> plugin installed.', 'contact-form-7' ) . '</em>';
20
 
21
  if ( empty( $tag->name ) )
22
  return '';
77
  $atts['id'] = $tag->get_option( 'id', 'id', true );
78
  $atts['tabindex'] = $tag->get_option( 'tabindex', 'int', true );
79
 
80
+ $atts['aria-invalid'] = $validation_error ? 'true' : 'false';
81
+
82
  $value = (string) reset( $tag->values );
83
 
84
  if ( wpcf7_is_posted() )
175
 
176
  function wpcf7_captcha_messages( $messages ) {
177
  return array_merge( $messages, array( 'captcha_not_match' => array(
178
+ 'description' => __( "The code that sender entered does not match the CAPTCHA", 'contact-form-7' ),
179
+ 'default' => __( 'Your entered code is incorrect.', 'contact-form-7' )
180
  ) ) );
181
  }
182
 
189
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
190
  return;
191
 
192
+ wpcf7_add_tag_generator( 'captcha', __( 'CAPTCHA', 'contact-form-7' ),
193
  'wpcf7-tg-pane-captcha', 'wpcf7_tg_pane_captcha' );
194
  }
195
 
200
  <table>
201
 
202
  <?php if ( ! class_exists( 'ReallySimpleCaptcha' ) ) : ?>
203
+ <tr><td colspan="2"><strong style="color: #e6255b"><?php echo esc_html( __( "Note: To use CAPTCHA, you need Really Simple CAPTCHA plugin installed.", 'contact-form-7' ) ); ?></strong><br /><a href="http://wordpress.org/extend/plugins/really-simple-captcha/">http://wordpress.org/extend/plugins/really-simple-captcha/</a></td></tr>
204
  <?php endif; ?>
205
 
206
+ <tr><td><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
207
  </table>
208
 
209
  <table class="scope captchac">
210
+ <caption><?php echo esc_html( __( "Image settings", 'contact-form-7' ) ); ?></caption>
211
 
212
  <tr>
213
+ <td><code>id</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
214
  <input type="text" name="id" class="idvalue oneline option" /></td>
215
 
216
+ <td><code>class</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
217
  <input type="text" name="class" class="classvalue oneline option" /></td>
218
  </tr>
219
 
220
  <tr>
221
+ <td><?php echo esc_html( __( "Foreground color", 'contact-form-7' ) ); ?> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
222
  <input type="text" name="fg" class="color oneline option" /></td>
223
 
224
+ <td><?php echo esc_html( __( "Background color", 'contact-form-7' ) ); ?> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
225
  <input type="text" name="bg" class="color oneline option" /></td>
226
  </tr>
227
 
228
+ <tr><td colspan="2"><?php echo esc_html( __( "Image size", 'contact-form-7' ) ); ?> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
229
+ <input type="checkbox" name="size:s" class="exclusive option" />&nbsp;<?php echo esc_html( __( "Small", 'contact-form-7' ) ); ?>&emsp;
230
+ <input type="checkbox" name="size:m" class="exclusive option" />&nbsp;<?php echo esc_html( __( "Medium", 'contact-form-7' ) ); ?>&emsp;
231
+ <input type="checkbox" name="size:l" class="exclusive option" />&nbsp;<?php echo esc_html( __( "Large", 'contact-form-7' ) ); ?>
232
  </td></tr>
233
  </table>
234
 
235
  <table class="scope captchar">
236
+ <caption><?php echo esc_html( __( "Input field settings", 'contact-form-7' ) ); ?></caption>
237
 
238
  <tr>
239
+ <td><code>id</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
240
  <input type="text" name="id" class="idvalue oneline option" /></td>
241
 
242
+ <td><code>class</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
243
  <input type="text" name="class" class="classvalue oneline option" /></td>
244
  </tr>
245
 
246
  <tr>
247
+ <td><code>size</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
248
  <input type="number" name="size" class="numeric oneline option" min="1" /></td>
249
 
250
+ <td><code>maxlength</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
251
  <input type="number" name="maxlength" class="numeric oneline option" min="1" /></td>
252
  </tr>
253
  </table>
254
 
255
+ <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'contact-form-7' ) ); ?>
256
+ <br />1) <?php echo esc_html( __( "For image", 'contact-form-7' ) ); ?>
257
  <input type="text" name="captchac" class="tag" readonly="readonly" onfocus="this.select()" />
258
+ <br />2) <?php echo esc_html( __( "For input field", 'contact-form-7' ) ); ?>
259
  <input type="text" name="captchar" class="tag" readonly="readonly" onfocus="this.select()" />
260
  </div>
261
  </form>
285
  wpcf7_init_captcha();
286
 
287
  if ( ! is_dir( $uploads_dir ) || ! wp_is_writable( $uploads_dir ) ) {
288
+ $message = sprintf( __( 'This contact form contains CAPTCHA fields, but the temporary folder for the files (%s) does not exist or is not writable. You can create the folder or change its permission manually.', 'contact-form-7' ), $uploads_dir );
289
 
290
  echo '<div class="error"><p><strong>' . esc_html( $message ) . '</strong></p></div>';
291
  }
292
 
293
  if ( ! function_exists( 'imagecreatetruecolor' ) || ! function_exists( 'imagettftext' ) ) {
294
+ $message = __( 'This contact form contains CAPTCHA fields, but the necessary libraries (GD and FreeType) are not available on your server.', 'contact-form-7' );
295
 
296
  echo '<div class="error"><p><strong>' . esc_html( $message ) . '</strong></p></div>';
297
  }
modules/checkbox.php CHANGED
@@ -5,7 +5,7 @@
5
 
6
  /* Shortcode handler */
7
 
8
- add_action( 'init', 'wpcf7_add_shortcode_checkbox', 5 );
9
 
10
  function wpcf7_add_shortcode_checkbox() {
11
  wpcf7_add_shortcode( array( 'checkbox', 'checkbox*', 'radio' ),
@@ -152,10 +152,10 @@ function wpcf7_add_tag_generator_checkbox_and_radio() {
152
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
153
  return;
154
 
155
- wpcf7_add_tag_generator( 'checkbox', __( 'Checkboxes', 'wpcf7' ),
156
  'wpcf7-tg-pane-checkbox', 'wpcf7_tg_pane_checkbox' );
157
 
158
- wpcf7_add_tag_generator( 'radio', __( 'Radio buttons', 'wpcf7' ),
159
  'wpcf7-tg-pane-radio', 'wpcf7_tg_pane_radio' );
160
  }
161
 
@@ -176,40 +176,40 @@ function wpcf7_tg_pane_checkbox_and_radio( $type = 'checkbox' ) {
176
  <form action="">
177
  <table>
178
  <?php if ( 'checkbox' == $type ) : ?>
179
- <tr><td><input type="checkbox" name="required" />&nbsp;<?php echo esc_html( __( 'Required field?', 'wpcf7' ) ); ?></td></tr>
180
  <?php endif; ?>
181
 
182
- <tr><td><?php echo esc_html( __( 'Name', 'wpcf7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
183
  </table>
184
 
185
  <table>
186
  <tr>
187
- <td><code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
188
  <input type="text" name="id" class="idvalue oneline option" /></td>
189
 
190
- <td><code>class</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
191
  <input type="text" name="class" class="classvalue oneline option" /></td>
192
  </tr>
193
 
194
  <tr>
195
- <td><?php echo esc_html( __( 'Choices', 'wpcf7' ) ); ?><br />
196
  <textarea name="values"></textarea><br />
197
- <span style="font-size: smaller"><?php echo esc_html( __( "* One choice per line.", 'wpcf7' ) ); ?></span>
198
  </td>
199
 
200
  <td>
201
- <br /><input type="checkbox" name="label_first" class="option" />&nbsp;<?php echo esc_html( __( 'Put a label first, a checkbox last?', 'wpcf7' ) ); ?>
202
- <br /><input type="checkbox" name="use_label_element" class="option" />&nbsp;<?php echo esc_html( __( 'Wrap each item with <label> tag?', 'wpcf7' ) ); ?>
203
  <?php if ( 'checkbox' == $type ) : ?>
204
- <br /><input type="checkbox" name="exclusive" class="option" />&nbsp;<?php echo esc_html( __( 'Make checkboxes exclusive?', 'wpcf7' ) ); ?>
205
  <?php endif; ?>
206
  </td>
207
  </tr>
208
  </table>
209
 
210
- <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?><br /><input type="text" name="<?php echo $type; ?>" class="tag" readonly="readonly" onfocus="this.select()" /></div>
211
 
212
- <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'wpcf7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
213
  </form>
214
  </div>
215
  <?php
5
 
6
  /* Shortcode handler */
7
 
8
+ add_action( 'wpcf7_init', 'wpcf7_add_shortcode_checkbox' );
9
 
10
  function wpcf7_add_shortcode_checkbox() {
11
  wpcf7_add_shortcode( array( 'checkbox', 'checkbox*', 'radio' ),
152
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
153
  return;
154
 
155
+ wpcf7_add_tag_generator( 'checkbox', __( 'Checkboxes', 'contact-form-7' ),
156
  'wpcf7-tg-pane-checkbox', 'wpcf7_tg_pane_checkbox' );
157
 
158
+ wpcf7_add_tag_generator( 'radio', __( 'Radio buttons', 'contact-form-7' ),
159
  'wpcf7-tg-pane-radio', 'wpcf7_tg_pane_radio' );
160
  }
161
 
176
  <form action="">
177
  <table>
178
  <?php if ( 'checkbox' == $type ) : ?>
179
+ <tr><td><input type="checkbox" name="required" />&nbsp;<?php echo esc_html( __( 'Required field?', 'contact-form-7' ) ); ?></td></tr>
180
  <?php endif; ?>
181
 
182
+ <tr><td><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
183
  </table>
184
 
185
  <table>
186
  <tr>
187
+ <td><code>id</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
188
  <input type="text" name="id" class="idvalue oneline option" /></td>
189
 
190
+ <td><code>class</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
191
  <input type="text" name="class" class="classvalue oneline option" /></td>
192
  </tr>
193
 
194
  <tr>
195
+ <td><?php echo esc_html( __( 'Choices', 'contact-form-7' ) ); ?><br />
196
  <textarea name="values"></textarea><br />
197
+ <span style="font-size: smaller"><?php echo esc_html( __( "* One choice per line.", 'contact-form-7' ) ); ?></span>
198
  </td>
199
 
200
  <td>
201
+ <br /><input type="checkbox" name="label_first" class="option" />&nbsp;<?php echo esc_html( __( 'Put a label first, a checkbox last?', 'contact-form-7' ) ); ?>
202
+ <br /><input type="checkbox" name="use_label_element" class="option" />&nbsp;<?php echo esc_html( __( 'Wrap each item with <label> tag?', 'contact-form-7' ) ); ?>
203
  <?php if ( 'checkbox' == $type ) : ?>
204
+ <br /><input type="checkbox" name="exclusive" class="option" />&nbsp;<?php echo esc_html( __( 'Make checkboxes exclusive?', 'contact-form-7' ) ); ?>
205
  <?php endif; ?>
206
  </td>
207
  </tr>
208
  </table>
209
 
210
+ <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'contact-form-7' ) ); ?><br /><input type="text" name="<?php echo $type; ?>" class="tag" readonly="readonly" onfocus="this.select()" /></div>
211
 
212
+ <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'contact-form-7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
213
  </form>
214
  </div>
215
  <?php
modules/date.php CHANGED
@@ -6,7 +6,7 @@
6
 
7
  /* Shortcode handler */
8
 
9
- add_action( 'init', 'wpcf7_add_shortcode_date', 5 );
10
 
11
  function wpcf7_add_shortcode_date() {
12
  wpcf7_add_shortcode( array( 'date', 'date*' ),
@@ -43,6 +43,8 @@ function wpcf7_date_shortcode_handler( $tag ) {
43
  if ( $tag->is_required() )
44
  $atts['aria-required'] = 'true';
45
 
 
 
46
  $value = (string) reset( $tag->values );
47
 
48
  if ( $tag->has_option( 'placeholder' ) || $tag->has_option( 'watermark' ) ) {
@@ -115,18 +117,18 @@ add_filter( 'wpcf7_messages', 'wpcf7_date_messages' );
115
  function wpcf7_date_messages( $messages ) {
116
  return array_merge( $messages, array(
117
  'invalid_date' => array(
118
- 'description' => __( "Date format that the sender entered is invalid", 'wpcf7' ),
119
- 'default' => __( 'Date format seems invalid.', 'wpcf7' )
120
  ),
121
 
122
  'date_too_early' => array(
123
- 'description' => __( "Date is earlier than minimum limit", 'wpcf7' ),
124
- 'default' => __( 'This date is too early.', 'wpcf7' )
125
  ),
126
 
127
  'date_too_late' => array(
128
- 'description' => __( "Date is later than maximum limit", 'wpcf7' ),
129
- 'default' => __( 'This date is too late.', 'wpcf7' )
130
  ) ) );
131
  }
132
 
@@ -139,7 +141,7 @@ function wpcf7_add_tag_generator_date() {
139
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
140
  return;
141
 
142
- wpcf7_add_tag_generator( 'date', __( 'Date', 'wpcf7' ),
143
  'wpcf7-tg-pane-date', 'wpcf7_tg_pane_date' );
144
  }
145
 
@@ -155,44 +157,44 @@ function wpcf7_tg_pane_date_and_relatives( $type = 'date' ) {
155
  <div id="wpcf7-tg-pane-<?php echo $type; ?>" class="hidden">
156
  <form action="">
157
  <table>
158
- <tr><td><input type="checkbox" name="required" />&nbsp;<?php echo esc_html( __( 'Required field?', 'wpcf7' ) ); ?></td></tr>
159
- <tr><td><?php echo esc_html( __( 'Name', 'wpcf7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
160
  </table>
161
 
162
  <table>
163
  <tr>
164
- <td><code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
165
  <input type="text" name="id" class="idvalue oneline option" /></td>
166
 
167
- <td><code>class</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
168
  <input type="text" name="class" class="classvalue oneline option" /></td>
169
  </tr>
170
 
171
  <tr>
172
- <td><code>min</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
173
  <input type="date" name="min" class="date oneline option" /></td>
174
 
175
- <td><code>max</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
176
  <input type="date" name="max" class="date oneline option" /></td>
177
  </tr>
178
 
179
  <tr>
180
- <td><code>step</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
181
  <input type="number" name="step" class="numeric oneline option" min="1" /></td>
182
  </tr>
183
 
184
  <tr>
185
- <td><?php echo esc_html( __( 'Default value', 'wpcf7' ) ); ?> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br /><input type="text" name="values" class="oneline" /></td>
186
 
187
  <td>
188
- <br /><input type="checkbox" name="placeholder" class="option" />&nbsp;<?php echo esc_html( __( 'Use this text as placeholder?', 'wpcf7' ) ); ?>
189
  </td>
190
  </tr>
191
  </table>
192
 
193
- <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?><br /><input type="text" name="<?php echo $type; ?>" class="tag" readonly="readonly" onfocus="this.select()" /></div>
194
 
195
- <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'wpcf7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
196
  </form>
197
  </div>
198
  <?php
6
 
7
  /* Shortcode handler */
8
 
9
+ add_action( 'wpcf7_init', 'wpcf7_add_shortcode_date' );
10
 
11
  function wpcf7_add_shortcode_date() {
12
  wpcf7_add_shortcode( array( 'date', 'date*' ),
43
  if ( $tag->is_required() )
44
  $atts['aria-required'] = 'true';
45
 
46
+ $atts['aria-invalid'] = $validation_error ? 'true' : 'false';
47
+
48
  $value = (string) reset( $tag->values );
49
 
50
  if ( $tag->has_option( 'placeholder' ) || $tag->has_option( 'watermark' ) ) {
117
  function wpcf7_date_messages( $messages ) {
118
  return array_merge( $messages, array(
119
  'invalid_date' => array(
120
+ 'description' => __( "Date format that the sender entered is invalid", 'contact-form-7' ),
121
+ 'default' => __( 'Date format seems invalid.', 'contact-form-7' )
122
  ),
123
 
124
  'date_too_early' => array(
125
+ 'description' => __( "Date is earlier than minimum limit", 'contact-form-7' ),
126
+ 'default' => __( 'This date is too early.', 'contact-form-7' )
127
  ),
128
 
129
  'date_too_late' => array(
130
+ 'description' => __( "Date is later than maximum limit", 'contact-form-7' ),
131
+ 'default' => __( 'This date is too late.', 'contact-form-7' )
132
  ) ) );
133
  }
134
 
141
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
142
  return;
143
 
144
+ wpcf7_add_tag_generator( 'date', __( 'Date', 'contact-form-7' ),
145
  'wpcf7-tg-pane-date', 'wpcf7_tg_pane_date' );
146
  }
147
 
157
  <div id="wpcf7-tg-pane-<?php echo $type; ?>" class="hidden">
158
  <form action="">
159
  <table>
160
+ <tr><td><input type="checkbox" name="required" />&nbsp;<?php echo esc_html( __( 'Required field?', 'contact-form-7' ) ); ?></td></tr>
161
+ <tr><td><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
162
  </table>
163
 
164
  <table>
165
  <tr>
166
+ <td><code>id</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
167
  <input type="text" name="id" class="idvalue oneline option" /></td>
168
 
169
+ <td><code>class</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
170
  <input type="text" name="class" class="classvalue oneline option" /></td>
171
  </tr>
172
 
173
  <tr>
174
+ <td><code>min</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
175
  <input type="date" name="min" class="date oneline option" /></td>
176
 
177
+ <td><code>max</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
178
  <input type="date" name="max" class="date oneline option" /></td>
179
  </tr>
180
 
181
  <tr>
182
+ <td><code>step</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
183
  <input type="number" name="step" class="numeric oneline option" min="1" /></td>
184
  </tr>
185
 
186
  <tr>
187
+ <td><?php echo esc_html( __( 'Default value', 'contact-form-7' ) ); ?> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br /><input type="text" name="values" class="oneline" /></td>
188
 
189
  <td>
190
+ <br /><input type="checkbox" name="placeholder" class="option" />&nbsp;<?php echo esc_html( __( 'Use this text as placeholder?', 'contact-form-7' ) ); ?>
191
  </td>
192
  </tr>
193
  </table>
194
 
195
+ <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'contact-form-7' ) ); ?><br /><input type="text" name="<?php echo $type; ?>" class="tag" readonly="readonly" onfocus="this.select()" /></div>
196
 
197
+ <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'contact-form-7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
198
  </form>
199
  </div>
200
  <?php
modules/file.php CHANGED
@@ -5,7 +5,7 @@
5
 
6
  /* Shortcode handler */
7
 
8
- add_action( 'init', 'wpcf7_add_shortcode_file', 5 );
9
 
10
  function wpcf7_add_shortcode_file() {
11
  wpcf7_add_shortcode( array( 'file', 'file*' ),
@@ -35,6 +35,8 @@ function wpcf7_file_shortcode_handler( $tag ) {
35
  if ( $tag->is_required() )
36
  $atts['aria-required'] = 'true';
37
 
 
 
38
  $atts['type'] = 'file';
39
  $atts['name'] = $tag->name;
40
  $atts['value'] = '1';
@@ -191,23 +193,23 @@ add_filter( 'wpcf7_messages', 'wpcf7_file_messages' );
191
  function wpcf7_file_messages( $messages ) {
192
  return array_merge( $messages, array(
193
  'upload_failed' => array(
194
- 'description' => __( "Uploading a file fails for any reason", 'wpcf7' ),
195
- 'default' => __( 'Failed to upload file.', 'wpcf7' )
196
  ),
197
 
198
  'upload_file_type_invalid' => array(
199
- 'description' => __( "Uploaded file is not allowed file type", 'wpcf7' ),
200
- 'default' => __( 'This file type is not allowed.', 'wpcf7' )
201
  ),
202
 
203
  'upload_file_too_large' => array(
204
- 'description' => __( "Uploaded file is too large", 'wpcf7' ),
205
- 'default' => __( 'This file is too large.', 'wpcf7' )
206
  ),
207
 
208
  'upload_failed_php_error' => array(
209
- 'description' => __( "Uploading a file fails for PHP error", 'wpcf7' ),
210
- 'default' => __( 'Failed to upload file. Error occurred.', 'wpcf7' )
211
  )
212
  ) );
213
  }
@@ -221,7 +223,7 @@ function wpcf7_add_tag_generator_file() {
221
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
222
  return;
223
 
224
- wpcf7_add_tag_generator( 'file', __( 'File upload', 'wpcf7' ),
225
  'wpcf7-tg-pane-file', 'wpcf7_tg_pane_file' );
226
  }
227
 
@@ -230,31 +232,31 @@ function wpcf7_tg_pane_file( &$contact_form ) {
230
  <div id="wpcf7-tg-pane-file" class="hidden">
231
  <form action="">
232
  <table>
233
- <tr><td><input type="checkbox" name="required" />&nbsp;<?php echo esc_html( __( 'Required field?', 'wpcf7' ) ); ?></td></tr>
234
- <tr><td><?php echo esc_html( __( 'Name', 'wpcf7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
235
  </table>
236
 
237
  <table>
238
  <tr>
239
- <td><code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
240
  <input type="text" name="id" class="idvalue oneline option" /></td>
241
 
242
- <td><code>class</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
243
  <input type="text" name="class" class="classvalue oneline option" /></td>
244
  </tr>
245
 
246
  <tr>
247
- <td><?php echo esc_html( __( "File size limit", 'wpcf7' ) ); ?> (<?php echo esc_html( __( 'bytes', 'wpcf7' ) ); ?>) (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
248
  <input type="text" name="limit" class="filesize oneline option" /></td>
249
 
250
- <td><?php echo esc_html( __( "Acceptable file types", 'wpcf7' ) ); ?> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
251
  <input type="text" name="filetypes" class="filetype oneline option" /></td>
252
  </tr>
253
  </table>
254
 
255
- <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?><br /><input type="text" name="file" class="tag" readonly="readonly" onfocus="this.select()" /></div>
256
 
257
- <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the File Attachments field below.", 'wpcf7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
258
  </form>
259
  </div>
260
  <?php
@@ -279,7 +281,7 @@ function wpcf7_file_display_warning_message() {
279
  wpcf7_init_uploads();
280
 
281
  if ( ! is_dir( $uploads_dir ) || ! wp_is_writable( $uploads_dir ) ) {
282
- $message = sprintf( __( 'This contact form contains file uploading fields, but the temporary folder for the files (%s) does not exist or is not writable. You can create the folder or change its permission manually.', 'wpcf7' ), $uploads_dir );
283
 
284
  echo '<div class="error"><p><strong>' . esc_html( $message ) . '</strong></p></div>';
285
  }
5
 
6
  /* Shortcode handler */
7
 
8
+ add_action( 'wpcf7_init', 'wpcf7_add_shortcode_file' );
9
 
10
  function wpcf7_add_shortcode_file() {
11
  wpcf7_add_shortcode( array( 'file', 'file*' ),
35
  if ( $tag->is_required() )
36
  $atts['aria-required'] = 'true';
37
 
38
+ $atts['aria-invalid'] = $validation_error ? 'true' : 'false';
39
+
40
  $atts['type'] = 'file';
41
  $atts['name'] = $tag->name;
42
  $atts['value'] = '1';
193
  function wpcf7_file_messages( $messages ) {
194
  return array_merge( $messages, array(
195
  'upload_failed' => array(
196
+ 'description' => __( "Uploading a file fails for any reason", 'contact-form-7' ),
197
+ 'default' => __( 'Failed to upload file.', 'contact-form-7' )
198
  ),
199
 
200
  'upload_file_type_invalid' => array(
201
+ 'description' => __( "Uploaded file is not allowed file type", 'contact-form-7' ),
202
+ 'default' => __( 'This file type is not allowed.', 'contact-form-7' )
203
  ),
204
 
205
  'upload_file_too_large' => array(
206
+ 'description' => __( "Uploaded file is too large", 'contact-form-7' ),
207
+ 'default' => __( 'This file is too large.', 'contact-form-7' )
208
  ),
209
 
210
  'upload_failed_php_error' => array(
211
+ 'description' => __( "Uploading a file fails for PHP error", 'contact-form-7' ),
212
+ 'default' => __( 'Failed to upload file. Error occurred.', 'contact-form-7' )
213
  )
214
  ) );
215
  }
223
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
224
  return;
225
 
226
+ wpcf7_add_tag_generator( 'file', __( 'File upload', 'contact-form-7' ),
227
  'wpcf7-tg-pane-file', 'wpcf7_tg_pane_file' );
228
  }
229
 
232
  <div id="wpcf7-tg-pane-file" class="hidden">
233
  <form action="">
234
  <table>
235
+ <tr><td><input type="checkbox" name="required" />&nbsp;<?php echo esc_html( __( 'Required field?', 'contact-form-7' ) ); ?></td></tr>
236
+ <tr><td><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
237
  </table>
238
 
239
  <table>
240
  <tr>
241
+ <td><code>id</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
242
  <input type="text" name="id" class="idvalue oneline option" /></td>
243
 
244
+ <td><code>class</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
245
  <input type="text" name="class" class="classvalue oneline option" /></td>
246
  </tr>
247
 
248
  <tr>
249
+ <td><?php echo esc_html( __( "File size limit", 'contact-form-7' ) ); ?> (<?php echo esc_html( __( 'bytes', 'contact-form-7' ) ); ?>) (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
250
  <input type="text" name="limit" class="filesize oneline option" /></td>
251
 
252
+ <td><?php echo esc_html( __( "Acceptable file types", 'contact-form-7' ) ); ?> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
253
  <input type="text" name="filetypes" class="filetype oneline option" /></td>
254
  </tr>
255
  </table>
256
 
257
+ <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'contact-form-7' ) ); ?><br /><input type="text" name="file" class="tag" readonly="readonly" onfocus="this.select()" /></div>
258
 
259
+ <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the File Attachments field below.", 'contact-form-7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
260
  </form>
261
  </div>
262
  <?php
281
  wpcf7_init_uploads();
282
 
283
  if ( ! is_dir( $uploads_dir ) || ! wp_is_writable( $uploads_dir ) ) {
284
+ $message = sprintf( __( 'This contact form contains file uploading fields, but the temporary folder for the files (%s) does not exist or is not writable. You can create the folder or change its permission manually.', 'contact-form-7' ), $uploads_dir );
285
 
286
  echo '<div class="error"><p><strong>' . esc_html( $message ) . '</strong></p></div>';
287
  }
modules/flamingo.php CHANGED
@@ -4,27 +4,25 @@
4
  ** http://wordpress.org/extend/plugins/flamingo/
5
  **/
6
 
7
- add_action( 'flamingo_init', 'wpcf7_flamingo_init' );
8
 
9
- function wpcf7_flamingo_init() {
10
- if ( ! class_exists( 'Flamingo_Inbound_Message' ) )
11
- return;
12
 
13
- if ( ! term_exists( 'contact-form-7', Flamingo_Inbound_Message::channel_taxonomy ) ) {
14
- wp_insert_term( __( 'Contact Form 7', 'wpcf7' ),
15
- Flamingo_Inbound_Message::channel_taxonomy,
16
- array( 'slug' => 'contact-form-7' ) );
17
  }
18
- }
19
 
20
- add_action( 'wpcf7_before_send_mail', 'wpcf7_flamingo_before_send_mail' );
21
-
22
- function wpcf7_flamingo_before_send_mail( $contactform ) {
23
- if ( ! ( class_exists( 'Flamingo_Contact' ) && class_exists( 'Flamingo_Inbound_Message' ) ) )
24
  return;
 
25
 
26
- if ( empty( $contactform->posted_data ) || ! empty( $contactform->skip_mail ) )
27
  return;
 
28
 
29
  $fields_senseless = $contactform->form_scan_shortcode(
30
  array( 'type' => array( 'captchar', 'quiz', 'acceptance' ) ) );
@@ -41,9 +39,9 @@ function wpcf7_flamingo_before_send_mail( $contactform ) {
41
  unset( $posted_data[$key] );
42
  }
43
 
44
- $email = isset( $posted_data['your-email'] ) ? trim( $posted_data['your-email'] ) : '';
45
- $name = isset( $posted_data['your-name'] ) ? trim( $posted_data['your-name'] ) : '';
46
- $subject = isset( $posted_data['your-subject'] ) ? trim( $posted_data['your-subject'] ) : '';
47
 
48
  $meta = array();
49
 
@@ -59,15 +57,104 @@ function wpcf7_flamingo_before_send_mail( $contactform ) {
59
  'email' => $email,
60
  'name' => $name ) );
61
 
62
- Flamingo_Inbound_Message::add( array(
63
- 'channel' => 'contact-form-7',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  'subject' => $subject,
65
  'from' => trim( sprintf( '%s <%s>', $name, $email ) ),
66
  'from_name' => $name,
67
  'from_email' => $email,
68
  'fields' => $posted_data,
69
  'meta' => $meta,
70
- 'akismet' => $akismet ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  }
72
 
73
  ?>
4
  ** http://wordpress.org/extend/plugins/flamingo/
5
  **/
6
 
7
+ add_action( 'wpcf7_submit', 'wpcf7_flamingo_submit', 10, 2 );
8
 
9
+ function wpcf7_flamingo_submit( $contactform, $result ) {
10
+ $cases = (array) apply_filters( 'wpcf7_flamingo_submit_if',
11
+ array( 'spam', 'mail_sent', 'mail_failed' ) );
12
 
13
+ if ( empty( $result['status'] )
14
+ || ! in_array( $result['status'], $cases ) ) {
15
+ return;
 
16
  }
 
17
 
18
+ if ( ! class_exists( 'Flamingo_Contact' )
19
+ || ! class_exists( 'Flamingo_Inbound_Message' ) ) {
 
 
20
  return;
21
+ }
22
 
23
+ if ( empty( $contactform->posted_data ) ) {
24
  return;
25
+ }
26
 
27
  $fields_senseless = $contactform->form_scan_shortcode(
28
  array( 'type' => array( 'captchar', 'quiz', 'acceptance' ) ) );
39
  unset( $posted_data[$key] );
40
  }
41
 
42
+ $email = wpcf7_flamingo_get_value( 'email', $contactform );
43
+ $name = wpcf7_flamingo_get_value( 'name', $contactform );
44
+ $subject = wpcf7_flamingo_get_value( 'subject', $contactform );
45
 
46
  $meta = array();
47
 
57
  'email' => $email,
58
  'name' => $name ) );
59
 
60
+ $channel_id = wpcf7_flamingo_add_channel(
61
+ $contactform->name, $contactform->title );
62
+
63
+ if ( $channel_id ) {
64
+ $channel = get_term( $channel_id,
65
+ Flamingo_Inbound_Message::channel_taxonomy );
66
+
67
+ if ( ! $channel || is_wp_error( $channel ) ) {
68
+ $channel = 'contact-form-7';
69
+ } else {
70
+ $channel = $channel->slug;
71
+ }
72
+ } else {
73
+ $channel = 'contact-form-7';
74
+ }
75
+
76
+ $args = array(
77
+ 'channel' => $channel,
78
  'subject' => $subject,
79
  'from' => trim( sprintf( '%s <%s>', $name, $email ) ),
80
  'from_name' => $name,
81
  'from_email' => $email,
82
  'fields' => $posted_data,
83
  'meta' => $meta,
84
+ 'akismet' => $akismet,
85
+ 'spam' => ( 'spam' == $result['status'] ) );
86
+
87
+ Flamingo_Inbound_Message::add( $args );
88
+ }
89
+
90
+ function wpcf7_flamingo_get_value( $field, $contactform ) {
91
+ if ( empty( $field ) || empty( $contactform ) ) {
92
+ return false;
93
+ }
94
+
95
+ $value = '';
96
+
97
+ if ( in_array( $field, array( 'email', 'name', 'subject' ) ) ) {
98
+ $templates = $contactform->additional_setting( 'flamingo_' . $field );
99
+
100
+ if ( empty( $templates[0] ) ) {
101
+ $template = sprintf( '[your-%s]', $field );
102
+ } else {
103
+ $template = trim( wpcf7_strip_quote( $templates[0] ) );
104
+ }
105
+
106
+ $value = $contactform->replace_mail_tags( $template );
107
+ }
108
+
109
+ $value = apply_filters( 'wpcf7_flamingo_get_value', $value,
110
+ $field, $contactform );
111
+
112
+ return $value;
113
+ }
114
+
115
+ function wpcf7_flamingo_add_channel( $slug, $name = '' ) {
116
+ if ( ! class_exists( 'Flamingo_Inbound_Message' ) )
117
+ return false;
118
+
119
+ $parent = term_exists( 'contact-form-7',
120
+ Flamingo_Inbound_Message::channel_taxonomy );
121
+
122
+ if ( ! $parent ) {
123
+ $parent = wp_insert_term( __( 'Contact Form 7', 'contact-form-7' ),
124
+ Flamingo_Inbound_Message::channel_taxonomy,
125
+ array( 'slug' => 'contact-form-7' ) );
126
+
127
+ if ( is_wp_error( $parent ) ) {
128
+ return false;
129
+ }
130
+ }
131
+
132
+ $parent = (int) $parent['term_id'];
133
+
134
+ if ( ! is_taxonomy_hierarchical( Flamingo_Inbound_Message::channel_taxonomy ) ) {
135
+ // backward compat for Flamingo 1.0.4 and lower
136
+ return $parent;
137
+ }
138
+
139
+ if ( empty( $name ) ) {
140
+ $name = $slug;
141
+ }
142
+
143
+ $channel = term_exists( $slug,
144
+ Flamingo_Inbound_Message::channel_taxonomy,
145
+ $parent );
146
+
147
+ if ( ! $channel ) {
148
+ $channel = wp_insert_term( $name,
149
+ Flamingo_Inbound_Message::channel_taxonomy,
150
+ array( 'slug' => $slug, 'parent' => $parent ) );
151
+
152
+ if ( is_wp_error( $channel ) ) {
153
+ return false;
154
+ }
155
+ }
156
+
157
+ return (int) $channel['term_id'];
158
  }
159
 
160
  ?>
modules/jetpack.php CHANGED
@@ -18,7 +18,7 @@ function wpcf7_jetpack_admin_notices() {
18
  $url = 'http://contactform7.com/jetpack-overrides-contact-forms/';
19
  ?>
20
  <div class="error">
21
- <p><?php echo sprintf( __( '<strong>Jetpack may cause problems for other plugins in certain cases.</strong> <a href="%s" target="_blank">See how to avoid it.</a>', 'wpcf7' ), $url ); ?></p>
22
  </div>
23
  <?php
24
  }
18
  $url = 'http://contactform7.com/jetpack-overrides-contact-forms/';
19
  ?>
20
  <div class="error">
21
+ <p><?php echo sprintf( __( '<strong>Jetpack may cause problems for other plugins in certain cases.</strong> <a href="%s" target="_blank">See how to avoid it.</a>', 'contact-form-7' ), $url ); ?></p>
22
  </div>
23
  <?php
24
  }
modules/number.php CHANGED
@@ -7,7 +7,7 @@
7
 
8
  /* Shortcode handler */
9
 
10
- add_action( 'init', 'wpcf7_add_shortcode_number', 5 );
11
 
12
  function wpcf7_add_shortcode_number() {
13
  wpcf7_add_shortcode( array( 'number', 'number*', 'range', 'range*' ),
@@ -44,6 +44,8 @@ function wpcf7_number_shortcode_handler( $tag ) {
44
  if ( $tag->is_required() )
45
  $atts['aria-required'] = 'true';
46
 
 
 
47
  $value = (string) reset( $tag->values );
48
 
49
  if ( $tag->has_option( 'placeholder' ) || $tag->has_option( 'watermark' ) ) {
@@ -118,18 +120,18 @@ add_filter( 'wpcf7_messages', 'wpcf7_number_messages' );
118
  function wpcf7_number_messages( $messages ) {
119
  return array_merge( $messages, array(
120
  'invalid_number' => array(
121
- 'description' => __( "Number format that the sender entered is invalid", 'wpcf7' ),
122
- 'default' => __( 'Number format seems invalid.', 'wpcf7' )
123
  ),
124
 
125
  'number_too_small' => array(
126
- 'description' => __( "Number is smaller than minimum limit", 'wpcf7' ),
127
- 'default' => __( 'This number is too small.', 'wpcf7' )
128
  ),
129
 
130
  'number_too_large' => array(
131
- 'description' => __( "Number is larger than maximum limit", 'wpcf7' ),
132
- 'default' => __( 'This number is too large.', 'wpcf7' )
133
  ) ) );
134
  }
135
 
@@ -142,10 +144,10 @@ function wpcf7_add_tag_generator_number() {
142
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
143
  return;
144
 
145
- wpcf7_add_tag_generator( 'number', __( 'Number (spinbox)', 'wpcf7' ),
146
  'wpcf7-tg-pane-number', 'wpcf7_tg_pane_number' );
147
 
148
- wpcf7_add_tag_generator( 'range', __( 'Number (slider)', 'wpcf7' ),
149
  'wpcf7-tg-pane-range', 'wpcf7_tg_pane_range' );
150
  }
151
 
@@ -165,44 +167,44 @@ function wpcf7_tg_pane_number_and_relatives( $type = 'number' ) {
165
  <div id="wpcf7-tg-pane-<?php echo $type; ?>" class="hidden">
166
  <form action="">
167
  <table>
168
- <tr><td><input type="checkbox" name="required" />&nbsp;<?php echo esc_html( __( 'Required field?', 'wpcf7' ) ); ?></td></tr>
169
- <tr><td><?php echo esc_html( __( 'Name', 'wpcf7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
170
  </table>
171
 
172
  <table>
173
  <tr>
174
- <td><code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
175
  <input type="text" name="id" class="idvalue oneline option" /></td>
176
 
177
- <td><code>class</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
178
  <input type="text" name="class" class="classvalue oneline option" /></td>
179
  </tr>
180
 
181
  <tr>
182
- <td><code>min</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
183
  <input type="number" name="min" class="numeric oneline option" /></td>
184
 
185
- <td><code>max</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
186
  <input type="number" name="max" class="numeric oneline option" /></td>
187
  </tr>
188
 
189
  <tr>
190
- <td><code>step</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
191
  <input type="number" name="step" class="numeric oneline option" min="1" /></td>
192
  </tr>
193
 
194
  <tr>
195
- <td><?php echo esc_html( __( 'Default value', 'wpcf7' ) ); ?> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br /><input type="text" name="values" class="oneline" /></td>
196
 
197
  <td>
198
- <br /><input type="checkbox" name="placeholder" class="option" />&nbsp;<?php echo esc_html( __( 'Use this text as placeholder?', 'wpcf7' ) ); ?>
199
  </td>
200
  </tr>
201
  </table>
202
 
203
- <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?><br /><input type="text" name="<?php echo $type; ?>" class="tag" readonly="readonly" onfocus="this.select()" /></div>
204
 
205
- <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'wpcf7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
206
  </form>
207
  </div>
208
  <?php
7
 
8
  /* Shortcode handler */
9
 
10
+ add_action( 'wpcf7_init', 'wpcf7_add_shortcode_number' );
11
 
12
  function wpcf7_add_shortcode_number() {
13
  wpcf7_add_shortcode( array( 'number', 'number*', 'range', 'range*' ),
44
  if ( $tag->is_required() )
45
  $atts['aria-required'] = 'true';
46
 
47
+ $atts['aria-invalid'] = $validation_error ? 'true' : 'false';
48
+
49
  $value = (string) reset( $tag->values );
50
 
51
  if ( $tag->has_option( 'placeholder' ) || $tag->has_option( 'watermark' ) ) {
120
  function wpcf7_number_messages( $messages ) {
121
  return array_merge( $messages, array(
122
  'invalid_number' => array(
123
+ 'description' => __( "Number format that the sender entered is invalid", 'contact-form-7' ),
124
+ 'default' => __( 'Number format seems invalid.', 'contact-form-7' )
125
  ),
126
 
127
  'number_too_small' => array(
128
+ 'description' => __( "Number is smaller than minimum limit", 'contact-form-7' ),
129
+ 'default' => __( 'This number is too small.', 'contact-form-7' )
130
  ),
131
 
132
  'number_too_large' => array(
133
+ 'description' => __( "Number is larger than maximum limit", 'contact-form-7' ),
134
+ 'default' => __( 'This number is too large.', 'contact-form-7' )
135
  ) ) );
136
  }
137
 
144
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
145
  return;
146
 
147
+ wpcf7_add_tag_generator( 'number', __( 'Number (spinbox)', 'contact-form-7' ),
148
  'wpcf7-tg-pane-number', 'wpcf7_tg_pane_number' );
149
 
150
+ wpcf7_add_tag_generator( 'range', __( 'Number (slider)', 'contact-form-7' ),
151
  'wpcf7-tg-pane-range', 'wpcf7_tg_pane_range' );
152
  }
153
 
167
  <div id="wpcf7-tg-pane-<?php echo $type; ?>" class="hidden">
168
  <form action="">
169
  <table>
170
+ <tr><td><input type="checkbox" name="required" />&nbsp;<?php echo esc_html( __( 'Required field?', 'contact-form-7' ) ); ?></td></tr>
171
+ <tr><td><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
172
  </table>
173
 
174
  <table>
175
  <tr>
176
+ <td><code>id</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
177
  <input type="text" name="id" class="idvalue oneline option" /></td>
178
 
179
+ <td><code>class</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
180
  <input type="text" name="class" class="classvalue oneline option" /></td>
181
  </tr>
182
 
183
  <tr>
184
+ <td><code>min</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
185
  <input type="number" name="min" class="numeric oneline option" /></td>
186
 
187
+ <td><code>max</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
188
  <input type="number" name="max" class="numeric oneline option" /></td>
189
  </tr>
190
 
191
  <tr>
192
+ <td><code>step</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
193
  <input type="number" name="step" class="numeric oneline option" min="1" /></td>
194
  </tr>
195
 
196
  <tr>
197
+ <td><?php echo esc_html( __( 'Default value', 'contact-form-7' ) ); ?> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br /><input type="text" name="values" class="oneline" /></td>
198
 
199
  <td>
200
+ <br /><input type="checkbox" name="placeholder" class="option" />&nbsp;<?php echo esc_html( __( 'Use this text as placeholder?', 'contact-form-7' ) ); ?>
201
  </td>
202
  </tr>
203
  </table>
204
 
205
+ <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'contact-form-7' ) ); ?><br /><input type="text" name="<?php echo $type; ?>" class="tag" readonly="readonly" onfocus="this.select()" /></div>
206
 
207
+ <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'contact-form-7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
208
  </form>
209
  </div>
210
  <?php
modules/quiz.php CHANGED
@@ -5,7 +5,7 @@
5
 
6
  /* Shortcode handler */
7
 
8
- add_action( 'init', 'wpcf7_add_shortcode_quiz', 5 );
9
 
10
  function wpcf7_add_shortcode_quiz() {
11
  wpcf7_add_shortcode( 'quiz', 'wpcf7_quiz_shortcode_handler', true );
@@ -32,6 +32,7 @@ function wpcf7_quiz_shortcode_handler( $tag ) {
32
  $atts['id'] = $tag->get_option( 'id', 'id', true );
33
  $atts['tabindex'] = $tag->get_option( 'tabindex', 'int', true );
34
  $atts['aria-required'] = 'true';
 
35
 
36
  $pipes = $tag->pipes;
37
 
@@ -139,8 +140,8 @@ add_filter( 'wpcf7_messages', 'wpcf7_quiz_messages' );
139
 
140
  function wpcf7_quiz_messages( $messages ) {
141
  return array_merge( $messages, array( 'quiz_answer_not_correct' => array(
142
- 'description' => __( "Sender doesn't enter the correct answer to the quiz", 'wpcf7' ),
143
- 'default' => __( 'Your answer is not correct.', 'wpcf7' )
144
  ) ) );
145
  }
146
 
@@ -153,7 +154,7 @@ function wpcf7_add_tag_generator_quiz() {
153
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
154
  return;
155
 
156
- wpcf7_add_tag_generator( 'quiz', __( 'Quiz', 'wpcf7' ),
157
  'wpcf7-tg-pane-quiz', 'wpcf7_tg_pane_quiz' );
158
  }
159
 
@@ -162,35 +163,35 @@ function wpcf7_tg_pane_quiz( &$contact_form ) {
162
  <div id="wpcf7-tg-pane-quiz" class="hidden">
163
  <form action="">
164
  <table>
165
- <tr><td><?php echo esc_html( __( 'Name', 'wpcf7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
166
  </table>
167
 
168
  <table>
169
  <tr>
170
- <td><code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
171
  <input type="text" name="id" class="idvalue oneline option" /></td>
172
 
173
- <td><code>class</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
174
  <input type="text" name="class" class="classvalue oneline option" /></td>
175
  </tr>
176
 
177
  <tr>
178
- <td><code>size</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
179
  <input type="number" name="size" class="numeric oneline option" min="1" /></td>
180
 
181
- <td><code>maxlength</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
182
  <input type="number" name="maxlength" class="numeric oneline option" min="1" /></td>
183
  </tr>
184
 
185
  <tr>
186
- <td><?php echo esc_html( __( 'Quizzes', 'wpcf7' ) ); ?><br />
187
  <textarea name="values"></textarea><br />
188
- <span style="font-size: smaller"><?php echo esc_html( __( "* quiz|answer (e.g. 1+1=?|2)", 'wpcf7' ) ); ?></span>
189
  </td>
190
  </tr>
191
  </table>
192
 
193
- <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?><br /><input type="text" name="quiz" class="tag" readonly="readonly" onfocus="this.select()" /></div>
194
  </form>
195
  </div>
196
  <?php
5
 
6
  /* Shortcode handler */
7
 
8
+ add_action( 'wpcf7_init', 'wpcf7_add_shortcode_quiz' );
9
 
10
  function wpcf7_add_shortcode_quiz() {
11
  wpcf7_add_shortcode( 'quiz', 'wpcf7_quiz_shortcode_handler', true );
32
  $atts['id'] = $tag->get_option( 'id', 'id', true );
33
  $atts['tabindex'] = $tag->get_option( 'tabindex', 'int', true );
34
  $atts['aria-required'] = 'true';
35
+ $atts['aria-invalid'] = $validation_error ? 'true' : 'false';
36
 
37
  $pipes = $tag->pipes;
38
 
140
 
141
  function wpcf7_quiz_messages( $messages ) {
142
  return array_merge( $messages, array( 'quiz_answer_not_correct' => array(
143
+ 'description' => __( "Sender doesn't enter the correct answer to the quiz", 'contact-form-7' ),
144
+ 'default' => __( 'Your answer is not correct.', 'contact-form-7' )
145
  ) ) );
146
  }
147
 
154
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
155
  return;
156
 
157
+ wpcf7_add_tag_generator( 'quiz', __( 'Quiz', 'contact-form-7' ),
158
  'wpcf7-tg-pane-quiz', 'wpcf7_tg_pane_quiz' );
159
  }
160
 
163
  <div id="wpcf7-tg-pane-quiz" class="hidden">
164
  <form action="">
165
  <table>
166
+ <tr><td><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
167
  </table>
168
 
169
  <table>
170
  <tr>
171
+ <td><code>id</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
172
  <input type="text" name="id" class="idvalue oneline option" /></td>
173
 
174
+ <td><code>class</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
175
  <input type="text" name="class" class="classvalue oneline option" /></td>
176
  </tr>
177
 
178
  <tr>
179
+ <td><code>size</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
180
  <input type="number" name="size" class="numeric oneline option" min="1" /></td>
181
 
182
+ <td><code>maxlength</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
183
  <input type="number" name="maxlength" class="numeric oneline option" min="1" /></td>
184
  </tr>
185
 
186
  <tr>
187
+ <td><?php echo esc_html( __( 'Quizzes', 'contact-form-7' ) ); ?><br />
188
  <textarea name="values"></textarea><br />
189
+ <span style="font-size: smaller"><?php echo esc_html( __( "* quiz|answer (e.g. 1+1=?|2)", 'contact-form-7' ) ); ?></span>
190
  </td>
191
  </tr>
192
  </table>
193
 
194
+ <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'contact-form-7' ) ); ?><br /><input type="text" name="quiz" class="tag" readonly="readonly" onfocus="this.select()" /></div>
195
  </form>
196
  </div>
197
  <?php
modules/select.php CHANGED
@@ -5,7 +5,7 @@
5
 
6
  /* Shortcode handler */
7
 
8
- add_action( 'init', 'wpcf7_add_shortcode_select', 5 );
9
 
10
  function wpcf7_add_shortcode_select() {
11
  wpcf7_add_shortcode( array( 'select', 'select*' ),
@@ -34,6 +34,8 @@ function wpcf7_select_shortcode_handler( $tag ) {
34
  if ( $tag->is_required() )
35
  $atts['aria-required'] = 'true';
36
 
 
 
37
  $defaults = array();
38
 
39
  if ( $matches = $tag->get_first_match_option( '/^default:([0-9_]+)$/' ) )
@@ -137,7 +139,7 @@ function wpcf7_add_tag_generator_menu() {
137
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
138
  return;
139
 
140
- wpcf7_add_tag_generator( 'menu', __( 'Drop-down menu', 'wpcf7' ),
141
  'wpcf7-tg-pane-menu', 'wpcf7_tg_pane_menu' );
142
  }
143
 
@@ -146,35 +148,35 @@ function wpcf7_tg_pane_menu( &$contact_form ) {
146
  <div id="wpcf7-tg-pane-menu" class="hidden">
147
  <form action="">
148
  <table>
149
- <tr><td><input type="checkbox" name="required" />&nbsp;<?php echo esc_html( __( 'Required field?', 'wpcf7' ) ); ?></td></tr>
150
- <tr><td><?php echo esc_html( __( 'Name', 'wpcf7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
151
  </table>
152
 
153
  <table>
154
  <tr>
155
- <td><code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
156
  <input type="text" name="id" class="idvalue oneline option" /></td>
157
 
158
- <td><code>class</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
159
  <input type="text" name="class" class="classvalue oneline option" /></td>
160
  </tr>
161
 
162
  <tr>
163
- <td><?php echo esc_html( __( 'Choices', 'wpcf7' ) ); ?><br />
164
  <textarea name="values"></textarea><br />
165
- <span style="font-size: smaller"><?php echo esc_html( __( "* One choice per line.", 'wpcf7' ) ); ?></span>
166
  </td>
167
 
168
  <td>
169
- <br /><input type="checkbox" name="multiple" class="option" />&nbsp;<?php echo esc_html( __( 'Allow multiple selections?', 'wpcf7' ) ); ?>
170
- <br /><input type="checkbox" name="include_blank" class="option" />&nbsp;<?php echo esc_html( __( 'Insert a blank item as the first option?', 'wpcf7' ) ); ?>
171
  </td>
172
  </tr>
173
  </table>
174
 
175
- <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?><br /><input type="text" name="select" class="tag" readonly="readonly" onfocus="this.select()" /></div>
176
 
177
- <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'wpcf7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
178
  </form>
179
  </div>
180
  <?php
5
 
6
  /* Shortcode handler */
7
 
8
+ add_action( 'wpcf7_init', 'wpcf7_add_shortcode_select' );
9
 
10
  function wpcf7_add_shortcode_select() {
11
  wpcf7_add_shortcode( array( 'select', 'select*' ),
34
  if ( $tag->is_required() )
35
  $atts['aria-required'] = 'true';
36
 
37
+ $atts['aria-invalid'] = $validation_error ? 'true' : 'false';
38
+
39
  $defaults = array();
40
 
41
  if ( $matches = $tag->get_first_match_option( '/^default:([0-9_]+)$/' ) )
139
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
140
  return;
141
 
142
+ wpcf7_add_tag_generator( 'menu', __( 'Drop-down menu', 'contact-form-7' ),
143
  'wpcf7-tg-pane-menu', 'wpcf7_tg_pane_menu' );
144
  }
145
 
148
  <div id="wpcf7-tg-pane-menu" class="hidden">
149
  <form action="">
150
  <table>
151
+ <tr><td><input type="checkbox" name="required" />&nbsp;<?php echo esc_html( __( 'Required field?', 'contact-form-7' ) ); ?></td></tr>
152
+ <tr><td><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
153
  </table>
154
 
155
  <table>
156
  <tr>
157
+ <td><code>id</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
158
  <input type="text" name="id" class="idvalue oneline option" /></td>
159
 
160
+ <td><code>class</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
161
  <input type="text" name="class" class="classvalue oneline option" /></td>
162
  </tr>
163
 
164
  <tr>
165
+ <td><?php echo esc_html( __( 'Choices', 'contact-form-7' ) ); ?><br />
166
  <textarea name="values"></textarea><br />
167
+ <span style="font-size: smaller"><?php echo esc_html( __( "* One choice per line.", 'contact-form-7' ) ); ?></span>
168
  </td>
169
 
170
  <td>
171
+ <br /><input type="checkbox" name="multiple" class="option" />&nbsp;<?php echo esc_html( __( 'Allow multiple selections?', 'contact-form-7' ) ); ?>
172
+ <br /><input type="checkbox" name="include_blank" class="option" />&nbsp;<?php echo esc_html( __( 'Insert a blank item as the first option?', 'contact-form-7' ) ); ?>
173
  </td>
174
  </tr>
175
  </table>
176
 
177
+ <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'contact-form-7' ) ); ?><br /><input type="text" name="select" class="tag" readonly="readonly" onfocus="this.select()" /></div>
178
 
179
+ <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'contact-form-7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
180
  </form>
181
  </div>
182
  <?php
modules/submit.php CHANGED
@@ -5,7 +5,7 @@
5
 
6
  /* Shortcode handler */
7
 
8
- add_action( 'init', 'wpcf7_add_shortcode_submit', 5 );
9
 
10
  function wpcf7_add_shortcode_submit() {
11
  wpcf7_add_shortcode( 'submit', 'wpcf7_submit_shortcode_handler' );
@@ -25,7 +25,7 @@ function wpcf7_submit_shortcode_handler( $tag ) {
25
  $value = isset( $tag->values[0] ) ? $tag->values[0] : '';
26
 
27
  if ( empty( $value ) )
28
- $value = __( 'Send', 'wpcf7' );
29
 
30
  $atts['type'] = 'submit';
31
  $atts['value'] = $value;
@@ -46,7 +46,7 @@ function wpcf7_add_tag_generator_submit() {
46
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
47
  return;
48
 
49
- wpcf7_add_tag_generator( 'submit', __( 'Submit button', 'wpcf7' ),
50
  'wpcf7-tg-pane-submit', 'wpcf7_tg_pane_submit', array( 'nameless' => 1 ) );
51
  }
52
 
@@ -56,22 +56,22 @@ function wpcf7_tg_pane_submit( &$contact_form ) {
56
  <form action="">
57
  <table>
58
  <tr>
59
- <td><code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
60
  <input type="text" name="id" class="idvalue oneline option" /></td>
61
 
62
- <td><code>class</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
63
  <input type="text" name="class" class="classvalue oneline option" /></td>
64
  </tr>
65
 
66
  <tr>
67
- <td><?php echo esc_html( __( 'Label', 'wpcf7' ) ); ?> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
68
  <input type="text" name="values" class="oneline" /></td>
69
 
70
  <td></td>
71
  </tr>
72
  </table>
73
 
74
- <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?><br /><input type="text" name="submit" class="tag" readonly="readonly" onfocus="this.select()" /></div>
75
  </form>
76
  </div>
77
  <?php
5
 
6
  /* Shortcode handler */
7
 
8
+ add_action( 'wpcf7_init', 'wpcf7_add_shortcode_submit' );
9
 
10
  function wpcf7_add_shortcode_submit() {
11
  wpcf7_add_shortcode( 'submit', 'wpcf7_submit_shortcode_handler' );
25
  $value = isset( $tag->values[0] ) ? $tag->values[0] : '';
26
 
27
  if ( empty( $value ) )
28
+ $value = __( 'Send', 'contact-form-7' );
29
 
30
  $atts['type'] = 'submit';
31
  $atts['value'] = $value;
46
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
47
  return;
48
 
49
+ wpcf7_add_tag_generator( 'submit', __( 'Submit button', 'contact-form-7' ),
50
  'wpcf7-tg-pane-submit', 'wpcf7_tg_pane_submit', array( 'nameless' => 1 ) );
51
  }
52
 
56
  <form action="">
57
  <table>
58
  <tr>
59
+ <td><code>id</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
60
  <input type="text" name="id" class="idvalue oneline option" /></td>
61
 
62
+ <td><code>class</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
63
  <input type="text" name="class" class="classvalue oneline option" /></td>
64
  </tr>
65
 
66
  <tr>
67
+ <td><?php echo esc_html( __( 'Label', 'contact-form-7' ) ); ?> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
68
  <input type="text" name="values" class="oneline" /></td>
69
 
70
  <td></td>
71
  </tr>
72
  </table>
73
 
74
+ <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'contact-form-7' ) ); ?><br /><input type="text" name="submit" class="tag" readonly="readonly" onfocus="this.select()" /></div>
75
  </form>
76
  </div>
77
  <?php
modules/text.php CHANGED
@@ -9,7 +9,7 @@
9
 
10
  /* Shortcode handler */
11
 
12
- add_action( 'init', 'wpcf7_add_shortcode_text', 5 );
13
 
14
  function wpcf7_add_shortcode_text() {
15
  wpcf7_add_shortcode(
@@ -47,6 +47,8 @@ function wpcf7_text_shortcode_handler( $tag ) {
47
  if ( $tag->is_required() )
48
  $atts['aria-required'] = 'true';
49
 
 
 
50
  $value = (string) reset( $tag->values );
51
 
52
  if ( $tag->has_option( 'placeholder' ) || $tag->has_option( 'watermark' ) ) {
@@ -163,18 +165,18 @@ add_filter( 'wpcf7_messages', 'wpcf7_text_messages' );
163
  function wpcf7_text_messages( $messages ) {
164
  return array_merge( $messages, array(
165
  'invalid_email' => array(
166
- 'description' => __( "Email address that the sender entered is invalid", 'wpcf7' ),
167
- 'default' => __( 'Email address seems invalid.', 'wpcf7' )
168
  ),
169
 
170
  'invalid_url' => array(
171
- 'description' => __( "URL that the sender entered is invalid", 'wpcf7' ),
172
- 'default' => __( 'URL seems invalid.', 'wpcf7' )
173
  ),
174
 
175
  'invalid_tel' => array(
176
- 'description' => __( "Telephone number that the sender entered is invalid", 'wpcf7' ),
177
- 'default' => __( 'Telephone number seems invalid.', 'wpcf7' )
178
  ) ) );
179
  }
180
 
@@ -187,16 +189,16 @@ function wpcf7_add_tag_generator_text() {
187
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
188
  return;
189
 
190
- wpcf7_add_tag_generator( 'text', __( 'Text field', 'wpcf7' ),
191
  'wpcf7-tg-pane-text', 'wpcf7_tg_pane_text' );
192
 
193
- wpcf7_add_tag_generator( 'email', __( 'Email', 'wpcf7' ),
194
  'wpcf7-tg-pane-email', 'wpcf7_tg_pane_email' );
195
 
196
- wpcf7_add_tag_generator( 'url', __( 'URL', 'wpcf7' ),
197
  'wpcf7-tg-pane-url', 'wpcf7_tg_pane_url' );
198
 
199
- wpcf7_add_tag_generator( 'tel', __( 'Telephone number', 'wpcf7' ),
200
  'wpcf7-tg-pane-tel', 'wpcf7_tg_pane_tel' );
201
  }
202
 
@@ -224,53 +226,53 @@ function wpcf7_tg_pane_text_and_relatives( $type = 'text' ) {
224
  <div id="wpcf7-tg-pane-<?php echo $type; ?>" class="hidden">
225
  <form action="">
226
  <table>
227
- <tr><td><input type="checkbox" name="required" />&nbsp;<?php echo esc_html( __( 'Required field?', 'wpcf7' ) ); ?></td></tr>
228
- <tr><td><?php echo esc_html( __( 'Name', 'wpcf7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
229
  </table>
230
 
231
  <table>
232
  <tr>
233
- <td><code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
234
  <input type="text" name="id" class="idvalue oneline option" /></td>
235
 
236
- <td><code>class</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
237
  <input type="text" name="class" class="classvalue oneline option" /></td>
238
  </tr>
239
 
240
  <tr>
241
- <td><code>size</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
242
  <input type="number" name="size" class="numeric oneline option" min="1" /></td>
243
 
244
- <td><code>maxlength</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
245
  <input type="number" name="maxlength" class="numeric oneline option" min="1" /></td>
246
  </tr>
247
 
248
  <?php if ( in_array( $type, array( 'text', 'email', 'url' ) ) ) : ?>
249
  <tr>
250
- <td colspan="2"><?php echo esc_html( __( 'Akismet', 'wpcf7' ) ); ?> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
251
  <?php if ( 'text' == $type ) : ?>
252
- <input type="checkbox" name="akismet:author" class="option" />&nbsp;<?php echo esc_html( __( "This field requires author's name", 'wpcf7' ) ); ?><br />
253
  <?php elseif ( 'email' == $type ) : ?>
254
- <input type="checkbox" name="akismet:author_email" class="option" />&nbsp;<?php echo esc_html( __( "This field requires author's email address", 'wpcf7' ) ); ?>
255
  <?php elseif ( 'url' == $type ) : ?>
256
- <input type="checkbox" name="akismet:author_url" class="option" />&nbsp;<?php echo esc_html( __( "This field requires author's URL", 'wpcf7' ) ); ?>
257
  <?php endif; ?>
258
  </td>
259
  </tr>
260
  <?php endif; ?>
261
 
262
  <tr>
263
- <td><?php echo esc_html( __( 'Default value', 'wpcf7' ) ); ?> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br /><input type="text" name="values" class="oneline" /></td>
264
 
265
  <td>
266
- <br /><input type="checkbox" name="placeholder" class="option" />&nbsp;<?php echo esc_html( __( 'Use this text as placeholder?', 'wpcf7' ) ); ?>
267
  </td>
268
  </tr>
269
  </table>
270
 
271
- <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?><br /><input type="text" name="<?php echo $type; ?>" class="tag" readonly="readonly" onfocus="this.select()" /></div>
272
 
273
- <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'wpcf7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
274
  </form>
275
  </div>
276
  <?php
9
 
10
  /* Shortcode handler */
11
 
12
+ add_action( 'wpcf7_init', 'wpcf7_add_shortcode_text' );
13
 
14
  function wpcf7_add_shortcode_text() {
15
  wpcf7_add_shortcode(
47
  if ( $tag->is_required() )
48
  $atts['aria-required'] = 'true';
49
 
50
+ $atts['aria-invalid'] = $validation_error ? 'true' : 'false';
51
+
52
  $value = (string) reset( $tag->values );
53
 
54
  if ( $tag->has_option( 'placeholder' ) || $tag->has_option( 'watermark' ) ) {
165
  function wpcf7_text_messages( $messages ) {
166
  return array_merge( $messages, array(
167
  'invalid_email' => array(
168
+ 'description' => __( "Email address that the sender entered is invalid", 'contact-form-7' ),
169
+ 'default' => __( 'Email address seems invalid.', 'contact-form-7' )
170
  ),
171
 
172
  'invalid_url' => array(
173
+ 'description' => __( "URL that the sender entered is invalid", 'contact-form-7' ),
174
+ 'default' => __( 'URL seems invalid.', 'contact-form-7' )
175
  ),
176
 
177
  'invalid_tel' => array(
178
+ 'description' => __( "Telephone number that the sender entered is invalid", 'contact-form-7' ),
179
+ 'default' => __( 'Telephone number seems invalid.', 'contact-form-7' )
180
  ) ) );
181
  }
182
 
189
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
190
  return;
191
 
192
+ wpcf7_add_tag_generator( 'text', __( 'Text field', 'contact-form-7' ),
193
  'wpcf7-tg-pane-text', 'wpcf7_tg_pane_text' );
194
 
195
+ wpcf7_add_tag_generator( 'email', __( 'Email', 'contact-form-7' ),
196
  'wpcf7-tg-pane-email', 'wpcf7_tg_pane_email' );
197
 
198
+ wpcf7_add_tag_generator( 'url', __( 'URL', 'contact-form-7' ),
199
  'wpcf7-tg-pane-url', 'wpcf7_tg_pane_url' );
200
 
201
+ wpcf7_add_tag_generator( 'tel', __( 'Telephone number', 'contact-form-7' ),
202
  'wpcf7-tg-pane-tel', 'wpcf7_tg_pane_tel' );
203
  }
204
 
226
  <div id="wpcf7-tg-pane-<?php echo $type; ?>" class="hidden">
227
  <form action="">
228
  <table>
229
+ <tr><td><input type="checkbox" name="required" />&nbsp;<?php echo esc_html( __( 'Required field?', 'contact-form-7' ) ); ?></td></tr>
230
+ <tr><td><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
231
  </table>
232
 
233
  <table>
234
  <tr>
235
+ <td><code>id</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
236
  <input type="text" name="id" class="idvalue oneline option" /></td>
237
 
238
+ <td><code>class</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
239
  <input type="text" name="class" class="classvalue oneline option" /></td>
240
  </tr>
241
 
242
  <tr>
243
+ <td><code>size</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
244
  <input type="number" name="size" class="numeric oneline option" min="1" /></td>
245
 
246
+ <td><code>maxlength</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
247
  <input type="number" name="maxlength" class="numeric oneline option" min="1" /></td>
248
  </tr>
249
 
250
  <?php if ( in_array( $type, array( 'text', 'email', 'url' ) ) ) : ?>
251
  <tr>
252
+ <td colspan="2"><?php echo esc_html( __( 'Akismet', 'contact-form-7' ) ); ?> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
253
  <?php if ( 'text' == $type ) : ?>
254
+ <input type="checkbox" name="akismet:author" class="option" />&nbsp;<?php echo esc_html( __( "This field requires author's name", 'contact-form-7' ) ); ?><br />
255
  <?php elseif ( 'email' == $type ) : ?>
256
+ <input type="checkbox" name="akismet:author_email" class="option" />&nbsp;<?php echo esc_html( __( "This field requires author's email address", 'contact-form-7' ) ); ?>
257
  <?php elseif ( 'url' == $type ) : ?>
258
+ <input type="checkbox" name="akismet:author_url" class="option" />&nbsp;<?php echo esc_html( __( "This field requires author's URL", 'contact-form-7' ) ); ?>
259
  <?php endif; ?>
260
  </td>
261
  </tr>
262
  <?php endif; ?>
263
 
264
  <tr>
265
+ <td><?php echo esc_html( __( 'Default value', 'contact-form-7' ) ); ?> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br /><input type="text" name="values" class="oneline" /></td>
266
 
267
  <td>
268
+ <br /><input type="checkbox" name="placeholder" class="option" />&nbsp;<?php echo esc_html( __( 'Use this text as placeholder?', 'contact-form-7' ) ); ?>
269
  </td>
270
  </tr>
271
  </table>
272
 
273
+ <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'contact-form-7' ) ); ?><br /><input type="text" name="<?php echo $type; ?>" class="tag" readonly="readonly" onfocus="this.select()" /></div>
274
 
275
+ <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'contact-form-7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
276
  </form>
277
  </div>
278
  <?php
modules/textarea.php CHANGED
@@ -5,7 +5,7 @@
5
 
6
  /* Shortcode handler */
7
 
8
- add_action( 'init', 'wpcf7_add_shortcode_textarea', 5 );
9
 
10
  function wpcf7_add_shortcode_textarea() {
11
  wpcf7_add_shortcode( array( 'textarea', 'textarea*' ),
@@ -40,6 +40,8 @@ function wpcf7_textarea_shortcode_handler( $tag ) {
40
  if ( $tag->is_required() )
41
  $atts['aria-required'] = 'true';
42
 
 
 
43
  $value = (string) reset( $tag->values );
44
 
45
  if ( '' !== $tag->content )
@@ -97,7 +99,7 @@ function wpcf7_add_tag_generator_textarea() {
97
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
98
  return;
99
 
100
- wpcf7_add_tag_generator( 'textarea', __( 'Text area', 'wpcf7' ),
101
  'wpcf7-tg-pane-textarea', 'wpcf7_tg_pane_textarea' );
102
  }
103
 
@@ -106,44 +108,44 @@ function wpcf7_tg_pane_textarea( &$contact_form ) {
106
  <div id="wpcf7-tg-pane-textarea" class="hidden">
107
  <form action="">
108
  <table>
109
- <tr><td><input type="checkbox" name="required" />&nbsp;<?php echo esc_html( __( 'Required field?', 'wpcf7' ) ); ?></td></tr>
110
- <tr><td><?php echo esc_html( __( 'Name', 'wpcf7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
111
  </table>
112
 
113
  <table>
114
  <tr>
115
- <td><code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
116
  <input type="text" name="id" class="idvalue oneline option" /></td>
117
 
118
- <td><code>class</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
119
  <input type="text" name="class" class="classvalue oneline option" /></td>
120
  </tr>
121
 
122
  <tr>
123
- <td><code>cols</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
124
  <input type="number" name="cols" class="numeric oneline option" min="1" /></td>
125
 
126
- <td><code>rows</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
127
  <input type="number" name="rows" class="numeric oneline option" min="1" /></td>
128
  </tr>
129
 
130
  <tr>
131
- <td><code>maxlength</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
132
  <input type="number" name="maxlength" class="numeric oneline option" min="1" /></td>
133
  </tr>
134
 
135
  <tr>
136
- <td><?php echo esc_html( __( 'Default value', 'wpcf7' ) ); ?> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br /><input type="text" name="values" class="oneline" /></td>
137
 
138
  <td>
139
- <br /><input type="checkbox" name="placeholder" class="option" />&nbsp;<?php echo esc_html( __( 'Use this text as placeholder?', 'wpcf7' ) ); ?>
140
  </td>
141
  </tr>
142
  </table>
143
 
144
- <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?><br /><input type="text" name="textarea" class="tag" readonly="readonly" onfocus="this.select()" /></div>
145
 
146
- <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'wpcf7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
147
  </form>
148
  </div>
149
  <?php
5
 
6
  /* Shortcode handler */
7
 
8
+ add_action( 'wpcf7_init', 'wpcf7_add_shortcode_textarea' );
9
 
10
  function wpcf7_add_shortcode_textarea() {
11
  wpcf7_add_shortcode( array( 'textarea', 'textarea*' ),
40
  if ( $tag->is_required() )
41
  $atts['aria-required'] = 'true';
42
 
43
+ $atts['aria-invalid'] = $validation_error ? 'true' : 'false';
44
+
45
  $value = (string) reset( $tag->values );
46
 
47
  if ( '' !== $tag->content )
99
  if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
100
  return;
101
 
102
+ wpcf7_add_tag_generator( 'textarea', __( 'Text area', 'contact-form-7' ),
103
  'wpcf7-tg-pane-textarea', 'wpcf7_tg_pane_textarea' );
104
  }
105
 
108
  <div id="wpcf7-tg-pane-textarea" class="hidden">
109
  <form action="">
110
  <table>
111
+ <tr><td><input type="checkbox" name="required" />&nbsp;<?php echo esc_html( __( 'Required field?', 'contact-form-7' ) ); ?></td></tr>
112
+ <tr><td><?php echo esc_html( __( 'Name', 'contact-form-7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td></tr>
113
  </table>
114
 
115
  <table>
116
  <tr>
117
+ <td><code>id</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
118
  <input type="text" name="id" class="idvalue oneline option" /></td>
119
 
120
+ <td><code>class</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
121
  <input type="text" name="class" class="classvalue oneline option" /></td>
122
  </tr>
123
 
124
  <tr>
125
+ <td><code>cols</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
126
  <input type="number" name="cols" class="numeric oneline option" min="1" /></td>
127
 
128
+ <td><code>rows</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
129
  <input type="number" name="rows" class="numeric oneline option" min="1" /></td>
130
  </tr>
131
 
132
  <tr>
133
+ <td><code>maxlength</code> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br />
134
  <input type="number" name="maxlength" class="numeric oneline option" min="1" /></td>
135
  </tr>
136
 
137
  <tr>
138
+ <td><?php echo esc_html( __( 'Default value', 'contact-form-7' ) ); ?> (<?php echo esc_html( __( 'optional', 'contact-form-7' ) ); ?>)<br /><input type="text" name="values" class="oneline" /></td>
139
 
140
  <td>
141
+ <br /><input type="checkbox" name="placeholder" class="option" />&nbsp;<?php echo esc_html( __( 'Use this text as placeholder?', 'contact-form-7' ) ); ?>
142
  </td>
143
  </tr>
144
  </table>
145
 
146
+ <div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'contact-form-7' ) ); ?><br /><input type="text" name="textarea" class="tag" readonly="readonly" onfocus="this.select()" /></div>
147
 
148
+ <div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'contact-form-7' ) ); ?><br /><span class="arrow">&#11015;</span>&nbsp;<input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
149
  </form>
150
  </div>
151
  <?php
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: takayukister
3
  Donate link: http://contactform7.com/donate/
4
  Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, multilingual
5
- Requires at least: 3.5
6
- Tested up to: 3.7.1
7
- Stable tag: 3.5.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -41,7 +41,7 @@ The following are other recommended plugins by the author of Contact Form 7.
41
  * Basque (Euskara; eu) - [karrikas](http://blog.karrikas.com/)
42
  * Belarusian (be_BY) - [Igor Dubilei](http://www.iflexion.com/)
43
  * Bosnian (bs) - [Vedran](http://www.seorabbit.com/)
44
- * Brazilian Portuguese (pt_BR) - [Leonardo Pinheiro](http://www.eletrikabarbarella.com.br/), [Henrique Vianna](http://henriquevianna.com/), [Caciano Gabriel Batista](http://www.gn10.com.br/), [Gervásio Antônio](http://twitter.com/gervasioantonio)
45
  * Bulgarian (bg_BG) - [Iliyan Darganov](http://www.darganov.com/)
46
  * Catalan (ca) - [Jordi Sancho](http://www.qasolutions.net/blog), Robert Buj, Jaume Aragay Badia
47
  * Central Kurdish (ckb) - Mahr Hassan
@@ -54,7 +54,7 @@ The following are other recommended plugins by the author of Contact Form 7.
54
  * Esperanto (eo_EO) - Arkadiusz Zychewicz
55
  * Estonian (et) - [Peeter Rahuvarm](http://www.kraabus.ee), Egon Elbre
56
  * Finnish (fi) - [Miika Turunen](http://www.webwork.fi/), [Mediajalostamo](http://www.mediajalostamo.fi/), [Jani Alha](http://www.wysiwyg.fi/)
57
- * French (fr_FR) - [Jillij](http://www.jillij.com/), [Oncle Tom](http://case.oncle-tom.net/), [Maître Mô](http://maitremo.fr/), Hédi Sellami
58
  * Galician (gl_ES) - [Arume Desenvolvementos Informáticos](http://www.arumeinformatica.es/)
59
  * Georgian (ka_GE) - [Nodar Rocko Davituri](http://davituri.com/)
60
  * German (de_DE) - [Marcel Spitau](http://blog.spitau.de), [Ivan Graf](http://blog.bildergallery.com/)
@@ -80,7 +80,7 @@ The following are other recommended plugins by the author of Contact Form 7.
80
  * Polish (pl_PL) - [Zbigniew Czernik](http://zibik.jogger.pl/), [Daniel Fruzynski](http://www.poradnik-webmastera.com), [RafalDesign](http://www.rafaldesign.pl/), [Bartosz Arendt](http://digitalfactory.pl/)
81
  * Portuguese (pt_PT) - [Hugo Baeta](http://hugobaeta.com), [Pedro Nave](http://pedronave.com/)
82
  * Russian (ru_RU) - Dmitry Volotovich, [Denis Voituk](http://artprima.cz/), [kg69design](http://kg69design.com/)
83
- * Romanian (ro_RO) - [Stas Sushkov](http://stas.nerd.ro/), [Anunturi Jibo](http://www.jibo.ro/), [Marius Olar](http://webdudes.ro/), [Flo Bejgu](http://inboxtranslation.com/)
84
  * Serbian (sr_RS) - [Vedran](http://www.seorabbit.com/), [Aleksandar Urošević](http://blog.urosevic.net/)
85
  * Sinhala (si_LK) - [Nitin Aggarwal](http://offshoreally.com/)
86
  * Slovak (sk_SK) - [Patrik Bóna](http://www.mrhead.sk/), [WordPress Slovakia](http://wp.sk/)
@@ -121,45 +121,18 @@ Do you have questions or issues with Contact Form 7? Use these support channels
121
 
122
  == Changelog ==
123
 
124
- = 3.5.4 =
125
-
126
- * Fixed: Strip slashes from some text inputs before validating them.
127
- * The jQuery Form Plugin (jquery.form.js) has been updated to 3.45.0.
128
- * Translations for German, French, Persian and Romanian have been updated.
129
-
130
- = 3.5.3 =
131
-
132
- * Checking of file extension when uploading has been enhanced.
133
- * The jQuery Form Plugin (jquery.form.js) has been updated to 3.44.0.
134
- * Translation for Central Kurdish (ckb) has been created.
135
- * Translations for German, Hungarian and Japanese have been updated.
136
-
137
- = 3.5.2 =
138
-
139
- * Fixed: Strip newlines to prevent mail header injection.
140
- * The jQuery Form Plugin (jquery.form.js) has been updated to 3.40.0.
141
- * Translations for Spanish and Dutch have been updated.
142
-
143
- = 3.5.1 =
144
-
145
- * Fixed: Submissions with array value cause PHP error.
146
- * Translation for Indian Bengali (bn_IN) has been created.
147
- * Translations for Spanish, Tagalog and Japanese have been updated.
148
-
149
- = 3.5 =
150
-
151
- * Added: Support of local file attachment.
152
- * Added: first_as_label option to drop-down menu (select) tag.
153
- * Added: Support of jQuery UI fallback for non-HTML5 browsers.
154
- * Show error message from jquery.form.js in a hidden element.
155
- * Make ajax-loader image have https URL when the page is https.
156
- * Use win_is_writable() to avoid file system issues on Windows server.
157
- * Save locale information when generating a contact form.
158
- * The jQuery Form Plugin (jquery.form.js) has been updated to 3.39.0.
159
- * Translations for Finnish, German and Turkish have been updated.
160
-
161
- == Upgrade Notice ==
162
-
163
- = 3.5.2 =
164
-
165
- This version fixes a security related bug. Upgrade immediately.
2
  Contributors: takayukister
3
  Donate link: http://contactform7.com/donate/
4
  Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, multilingual
5
+ Requires at least: 3.6
6
+ Tested up to: 3.8
7
+ Stable tag: 3.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
41
  * Basque (Euskara; eu) - [karrikas](http://blog.karrikas.com/)
42
  * Belarusian (be_BY) - [Igor Dubilei](http://www.iflexion.com/)
43
  * Bosnian (bs) - [Vedran](http://www.seorabbit.com/)
44
+ * Brazilian Portuguese (pt_BR) - [Leonardo Pinheiro](http://www.eletrikabarbarella.com.br/), [Henrique Vianna](http://henriquevianna.com/), [Caciano Gabriel Batista](http://www.gn10.com.br/), [Gervásio Antônio](http://twitter.com/gervasioantonio), Gilvanilson Santos
45
  * Bulgarian (bg_BG) - [Iliyan Darganov](http://www.darganov.com/)
46
  * Catalan (ca) - [Jordi Sancho](http://www.qasolutions.net/blog), Robert Buj, Jaume Aragay Badia
47
  * Central Kurdish (ckb) - Mahr Hassan
54
  * Esperanto (eo_EO) - Arkadiusz Zychewicz
55
  * Estonian (et) - [Peeter Rahuvarm](http://www.kraabus.ee), Egon Elbre
56
  * Finnish (fi) - [Miika Turunen](http://www.webwork.fi/), [Mediajalostamo](http://www.mediajalostamo.fi/), [Jani Alha](http://www.wysiwyg.fi/)
57
+ * French (fr_FR) - [Jillij](http://www.jillij.com/), [Oncle Tom](http://case.oncle-tom.net/), [Maître Mô](http://maitremo.fr/), Emmanuel Simond, Hédi Sellami
58
  * Galician (gl_ES) - [Arume Desenvolvementos Informáticos](http://www.arumeinformatica.es/)
59
  * Georgian (ka_GE) - [Nodar Rocko Davituri](http://davituri.com/)
60
  * German (de_DE) - [Marcel Spitau](http://blog.spitau.de), [Ivan Graf](http://blog.bildergallery.com/)
80
  * Polish (pl_PL) - [Zbigniew Czernik](http://zibik.jogger.pl/), [Daniel Fruzynski](http://www.poradnik-webmastera.com), [RafalDesign](http://www.rafaldesign.pl/), [Bartosz Arendt](http://digitalfactory.pl/)
81
  * Portuguese (pt_PT) - [Hugo Baeta](http://hugobaeta.com), [Pedro Nave](http://pedronave.com/)
82
  * Russian (ru_RU) - Dmitry Volotovich, [Denis Voituk](http://artprima.cz/), [kg69design](http://kg69design.com/)
83
+ * Romanian (ro_RO) - [Stas Sushkov](http://stas.nerd.ro/), [Anunturi Jibo](http://www.jibo.ro/), [Marius Olar](http://webdudes.ro/), [Inbox Translation](http://inboxtranslation.com/)
84
  * Serbian (sr_RS) - [Vedran](http://www.seorabbit.com/), [Aleksandar Urošević](http://blog.urosevic.net/)
85
  * Sinhala (si_LK) - [Nitin Aggarwal](http://offshoreally.com/)
86
  * Slovak (sk_SK) - [Patrik Bóna](http://www.mrhead.sk/), [WordPress Slovakia](http://wp.sk/)
121
 
122
  == Changelog ==
123
 
124
+ = 3.6 =
125
+
126
+ * Accessibility: Apply role="alert" to response message and validation errors.
127
+ * Accessibility: Apply aria-invalid="true" to input fields in which validation errors occuring.
128
+ * Accessibility: Stop using floating-style validation error messages (not-valid-tip) which disappear with mouse-over, as it is not accessible.
129
+ * Text domain has been changed from "wpcf7" to "contact-form-7" according with the standard of WordPress.org language packs.
130
+ * Admin: "Add New" submenu has been added.
131
+ * Flamingo: Sub-channel support.
132
+ * Flamingo: Pass data to Flamingo in cases of spam detected, in addition to cases of mail sent.
133
+ * Flamingo: Support flamingo_email, flamingo_name and flamingo_subject additional settings which allow to alter values passed to Flamingo.
134
+ * New: Date format in mail.
135
+ * New: wpcf7_submit action hook.
136
+ * New: wpcf7_flamingo_submit_if and wpcf7_flamingo_get_value filter hooks.
137
+ * The jQuery Form Plugin (jquery.form.js) has been updated to 3.46.0.
138
+ * Translations for Brazilian Portuguese and French have been updated.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
settings.php CHANGED
@@ -7,88 +7,46 @@ require_once WPCF7_PLUGIN_DIR . '/includes/pipe.php';
7
  require_once WPCF7_PLUGIN_DIR . '/includes/shortcodes.php';
8
  require_once WPCF7_PLUGIN_DIR . '/includes/capabilities.php';
9
  require_once WPCF7_PLUGIN_DIR . '/includes/classes.php';
 
10
 
11
  if ( is_admin() )
12
  require_once WPCF7_PLUGIN_DIR . '/admin/admin.php';
13
  else
14
  require_once WPCF7_PLUGIN_DIR . '/includes/controller.php';
15
 
16
- add_action( 'plugins_loaded', 'wpcf7', 1 );
17
 
18
  function wpcf7() {
19
- global $wpcf7;
20
-
21
- if ( is_object( $wpcf7 ) )
22
- return;
23
-
24
- $wpcf7 = (object) array(
25
- 'processing_within' => '',
26
- 'widget_count' => 0,
27
- 'unit_count' => 0,
28
- 'global_unit_count' => 0,
29
- 'result' => array() );
30
- }
31
-
32
- add_action( 'plugins_loaded', 'wpcf7_init_shortcode_manager', 1 );
33
-
34
- function wpcf7_init_shortcode_manager() {
35
- global $wpcf7_shortcode_manager;
36
-
37
- $wpcf7_shortcode_manager = new WPCF7_ShortcodeManager();
38
- }
39
-
40
- /* Loading modules */
41
-
42
- add_action( 'plugins_loaded', 'wpcf7_load_modules', 1 );
43
-
44
- function wpcf7_load_modules() {
45
- $dir = WPCF7_PLUGIN_MODULES_DIR;
46
-
47
- if ( ! ( is_dir( $dir ) && $dh = opendir( $dir ) ) )
48
- return false;
49
-
50
- while ( ( $module = readdir( $dh ) ) !== false ) {
51
- if ( substr( $module, -4 ) == '.php' && substr( $module, 0, 1 ) != '.' )
52
- include_once $dir . '/' . $module;
53
  }
54
- }
55
-
56
- add_action( 'plugins_loaded', 'wpcf7_set_request_uri', 9 );
57
-
58
- function wpcf7_set_request_uri() {
59
- global $wpcf7_request_uri;
60
 
61
- $wpcf7_request_uri = add_query_arg( array() );
62
- }
63
-
64
- function wpcf7_get_request_uri() {
65
- global $wpcf7_request_uri;
66
 
67
- return (string) $wpcf7_request_uri;
 
68
  }
69
 
70
  add_action( 'init', 'wpcf7_init' );
71
 
72
  function wpcf7_init() {
73
- // L10N
74
- wpcf7_load_plugin_textdomain();
 
75
 
76
- // Custom Post Type
77
  wpcf7_register_post_types();
78
 
79
  do_action( 'wpcf7_init' );
80
  }
81
 
82
- function wpcf7_load_plugin_textdomain() {
83
- load_plugin_textdomain( 'wpcf7', false, 'contact-form-7/languages' );
84
- }
85
-
86
- function wpcf7_register_post_types() {
87
- WPCF7_ContactForm::register_post_type();
88
- }
89
-
90
- /* Upgrading */
91
-
92
  add_action( 'admin_init', 'wpcf7_upgrade' );
93
 
94
  function wpcf7_upgrade() {
@@ -110,79 +68,6 @@ function wpcf7_upgrade() {
110
  update_option( 'wpcf7', $opt );
111
  }
112
 
113
- add_action( 'wpcf7_upgrade', 'wpcf7_convert_to_cpt', 10, 2 );
114
-
115
- function wpcf7_convert_to_cpt( $new_ver, $old_ver ) {
116
- global $wpdb;
117
-
118
- if ( ! version_compare( $old_ver, '3.0-dev', '<' ) )
119
- return;
120
-
121
- $old_rows = array();
122
-
123
- $table_name = $wpdb->prefix . "contact_form_7";
124
-
125
- if ( $wpdb->get_var( "SHOW TABLES LIKE '$table_name'" ) ) {
126
- $old_rows = $wpdb->get_results( "SELECT * FROM $table_name" );
127
- } elseif ( ( $opt = get_option( 'wpcf7' ) ) && ! empty( $opt['contact_forms'] ) ) {
128
- foreach ( (array) $opt['contact_forms'] as $key => $value ) {
129
- $old_rows[] = (object) array_merge( $value, array( 'cf7_unit_id' => $key ) );
130
- }
131
- }
132
-
133
- foreach ( (array) $old_rows as $row ) {
134
- $q = "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_old_cf7_unit_id'"
135
- . $wpdb->prepare( " AND meta_value = %d", $row->cf7_unit_id );
136
-
137
- if ( $wpdb->get_var( $q ) )
138
- continue;
139
-
140
- $postarr = array(
141
- 'post_type' => 'wpcf7_contact_form',
142
- 'post_status' => 'publish',
143
- 'post_title' => maybe_unserialize( $row->title ) );
144
-
145
- $post_id = wp_insert_post( $postarr );
146
-
147
- if ( $post_id ) {
148
- update_post_meta( $post_id, '_old_cf7_unit_id', $row->cf7_unit_id );
149
-
150
- $metas = array( 'form', 'mail', 'mail_2', 'messages', 'additional_settings' );
151
-
152
- foreach ( $metas as $meta ) {
153
- update_post_meta( $post_id, '_' . $meta,
154
- wpcf7_normalize_newline_deep( maybe_unserialize( $row->{$meta} ) ) );
155
- }
156
- }
157
- }
158
- }
159
-
160
- add_action( 'wpcf7_upgrade', 'wpcf7_prepend_underscore', 10, 2 );
161
-
162
- function wpcf7_prepend_underscore( $new_ver, $old_ver ) {
163
- if ( version_compare( $old_ver, '3.0-dev', '<' ) )
164
- return;
165
-
166
- if ( ! version_compare( $old_ver, '3.3-dev', '<' ) )
167
- return;
168
-
169
- $posts = WPCF7_ContactForm::find( array(
170
- 'post_status' => 'any',
171
- 'posts_per_page' => -1 ) );
172
-
173
- foreach ( $posts as $post ) {
174
- $props = $post->get_properties();
175
-
176
- foreach ( $props as $prop => $value ) {
177
- if ( metadata_exists( 'post', $post->id, '_' . $prop ) )
178
- continue;
179
-
180
- update_post_meta( $post->id, '_' . $prop, $value );
181
- delete_post_meta( $post->id, $prop );
182
- }
183
- }
184
- }
185
-
186
  /* Install and default settings */
187
 
188
  add_action( 'activate_' . WPCF7_PLUGIN_BASENAME, 'wpcf7_install' );
@@ -191,7 +76,7 @@ function wpcf7_install() {
191
  if ( $opt = get_option( 'wpcf7' ) )
192
  return;
193
 
194
- wpcf7_load_plugin_textdomain();
195
  wpcf7_register_post_types();
196
  wpcf7_upgrade();
197
 
@@ -199,7 +84,7 @@ function wpcf7_install() {
199
  return;
200
 
201
  $contact_form = wpcf7_get_contact_form_default_pack(
202
- array( 'title' => sprintf( __( 'Contact form %d', 'wpcf7' ), 1 ) ) );
203
 
204
  $contact_form->save();
205
  }
7
  require_once WPCF7_PLUGIN_DIR . '/includes/shortcodes.php';
8
  require_once WPCF7_PLUGIN_DIR . '/includes/capabilities.php';
9
  require_once WPCF7_PLUGIN_DIR . '/includes/classes.php';
10
+ require_once WPCF7_PLUGIN_DIR . '/includes/upgrade.php';
11
 
12
  if ( is_admin() )
13
  require_once WPCF7_PLUGIN_DIR . '/admin/admin.php';
14
  else
15
  require_once WPCF7_PLUGIN_DIR . '/includes/controller.php';
16
 
17
+ add_action( 'plugins_loaded', 'wpcf7' );
18
 
19
  function wpcf7() {
20
+ global $wpcf7, $wpcf7_shortcode_manager;
21
+
22
+ if ( ! is_object( $wpcf7 ) ) {
23
+ $wpcf7 = (object) array(
24
+ 'processing_within' => '',
25
+ 'widget_count' => 0,
26
+ 'unit_count' => 0,
27
+ 'global_unit_count' => 0,
28
+ 'result' => array(),
29
+ 'request_uri' => null );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  }
 
 
 
 
 
 
31
 
32
+ $wpcf7_shortcode_manager = new WPCF7_ShortcodeManager();
 
 
 
 
33
 
34
+ wpcf7_load_textdomain();
35
+ wpcf7_load_modules();
36
  }
37
 
38
  add_action( 'init', 'wpcf7_init' );
39
 
40
  function wpcf7_init() {
41
+ global $wpcf7;
42
+
43
+ $wpcf7->request_uri = add_query_arg( array() );
44
 
 
45
  wpcf7_register_post_types();
46
 
47
  do_action( 'wpcf7_init' );
48
  }
49
 
 
 
 
 
 
 
 
 
 
 
50
  add_action( 'admin_init', 'wpcf7_upgrade' );
51
 
52
  function wpcf7_upgrade() {
68
  update_option( 'wpcf7', $opt );
69
  }
70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  /* Install and default settings */
72
 
73
  add_action( 'activate_' . WPCF7_PLUGIN_BASENAME, 'wpcf7_install' );
76
  if ( $opt = get_option( 'wpcf7' ) )
77
  return;
78
 
79
+ wpcf7_load_textdomain();
80
  wpcf7_register_post_types();
81
  wpcf7_upgrade();
82
 
84
  return;
85
 
86
  $contact_form = wpcf7_get_contact_form_default_pack(
87
+ array( 'title' => sprintf( __( 'Contact form %d', 'contact-form-7' ), 1 ) ) );
88
 
89
  $contact_form->save();
90
  }
wp-contact-form-7.php CHANGED
@@ -5,9 +5,9 @@ Plugin URI: http://contactform7.com/
5
  Description: Just another contact form plugin. Simple but flexible.
6
  Author: Takayuki Miyoshi
7
  Author URI: http://ideasilo.wordpress.com/
8
- Text Domain: wpcf7
9
  Domain Path: /languages/
10
- Version: 3.5.4
11
  */
12
 
13
  /* Copyright 2007-2013 Takayuki Miyoshi (email: takayukister at gmail.com)
@@ -27,9 +27,9 @@ Version: 3.5.4
27
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28
  */
29
 
30
- define( 'WPCF7_VERSION', '3.5.4' );
31
 
32
- define( 'WPCF7_REQUIRED_WP_VERSION', '3.5' );
33
 
34
  if ( ! defined( 'WPCF7_PLUGIN_BASENAME' ) )
35
  define( 'WPCF7_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
@@ -58,10 +58,6 @@ if ( ! defined( 'WPCF7_AUTOP' ) )
58
  if ( ! defined( 'WPCF7_USE_PIPE' ) )
59
  define( 'WPCF7_USE_PIPE', true );
60
 
61
- /* If you or your client hate to see about donation, set this value false. */
62
- if ( ! defined( 'WPCF7_SHOW_DONATION_LINK' ) )
63
- define( 'WPCF7_SHOW_DONATION_LINK', true );
64
-
65
  if ( ! defined( 'WPCF7_ADMIN_READ_CAPABILITY' ) )
66
  define( 'WPCF7_ADMIN_READ_CAPABILITY', 'edit_posts' );
67
 
5
  Description: Just another contact form plugin. Simple but flexible.
6
  Author: Takayuki Miyoshi
7
  Author URI: http://ideasilo.wordpress.com/
8
+ Text Domain: contact-form-7
9
  Domain Path: /languages/
10
+ Version: 3.6
11
  */
12
 
13
  /* Copyright 2007-2013 Takayuki Miyoshi (email: takayukister at gmail.com)
27
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28
  */
29
 
30
+ define( 'WPCF7_VERSION', '3.6' );
31
 
32
+ define( 'WPCF7_REQUIRED_WP_VERSION', '3.6' );
33
 
34
  if ( ! defined( 'WPCF7_PLUGIN_BASENAME' ) )
35
  define( 'WPCF7_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
58
  if ( ! defined( 'WPCF7_USE_PIPE' ) )
59
  define( 'WPCF7_USE_PIPE', true );
60
 
 
 
 
 
61
  if ( ! defined( 'WPCF7_ADMIN_READ_CAPABILITY' ) )
62
  define( 'WPCF7_ADMIN_READ_CAPABILITY', 'edit_posts' );
63