Contact Form 7 Honeypot - Version 1.10

Version Description

Updates for Function/Class changes related to CF7 4.6. Removed plugin local language support, instead use translate.wordpress.org.

Download this release

Release Info

Developer DaoByDesign
Plugin Icon 128x128 Contact Form 7 Honeypot
Version 1.10
Comparing to
See all releases

Code changes from version 1.9 to 1.10

honeypot.php CHANGED
@@ -5,9 +5,9 @@ Plugin URI: http://www.nocean.ca/plugins/honeypot-module-for-contact-form-7-word
5
  Description: Add honeypot anti-spam functionality to the popular Contact Form 7 plugin.
6
  Author: Nocean
7
  Author URI: http://www.nocean.ca
8
- Version: 1.9
9
  Text Domain: contact-form-7-honeypot
10
- Domain Path: /languages
11
  */
12
 
13
  /* Copyright 2015 Ryan McLaughlin (email : hello@nocean.ca)
@@ -30,6 +30,10 @@ Domain Path: /languages
30
 
31
  /**
32
  * Load textdomain
 
 
 
 
33
  */
34
  add_action( 'plugins_loaded', 'wpcf7_honeypot_load_textdomain' );
35
  function wpcf7_honeypot_load_textdomain() {
@@ -75,20 +79,28 @@ function wpcf7_honeypot_nocf7_notice() { ?>
75
  * This lets CF7 know about Mr. Honeypot.
76
  *
77
  */
78
- add_action('wpcf7_init', 'wpcf7_add_shortcode_honeypot', 10);
79
- function wpcf7_add_shortcode_honeypot() {
80
- wpcf7_add_shortcode( 'honeypot', 'wpcf7_honeypot_shortcode_handler', true );
 
 
 
 
 
 
81
  }
82
 
83
 
84
  /**
85
  *
86
- * Shortcode handler
87
  * This is where we generate the honeypot HTML from the shortcode options
88
  *
89
  */
90
- function wpcf7_honeypot_shortcode_handler( $tag ) {
91
- $tag = new WPCF7_Shortcode( $tag );
 
 
92
 
93
  if ( empty( $tag->name ) )
94
  return '';
@@ -128,7 +140,9 @@ function wpcf7_honeypot_shortcode_handler( $tag ) {
128
  add_filter( 'wpcf7_validate_honeypot', 'wpcf7_honeypot_filter' ,10,2);
129
 
130
  function wpcf7_honeypot_filter ( $result, $tag ) {
131
- $tag = new WPCF7_Shortcode( $tag );
 
 
132
 
133
  $name = $tag->name;
134
 
5
  Description: Add honeypot anti-spam functionality to the popular Contact Form 7 plugin.
6
  Author: Nocean
7
  Author URI: http://www.nocean.ca
8
+ Version: 1.10
9
  Text Domain: contact-form-7-honeypot
10
+ Domain Path: /languages/
11
  */
12
 
13
  /* Copyright 2015 Ryan McLaughlin (email : hello@nocean.ca)
30
 
31
  /**
32
  * Load textdomain
33
+ *
34
+ * Technically depreciated, all translations are handled via
35
+ * https://translate.wordpress.org/projects/wp-plugins/contact-form-7-honeypot
36
+ * Leaving in the code for now.
37
  */
38
  add_action( 'plugins_loaded', 'wpcf7_honeypot_load_textdomain' );
39
  function wpcf7_honeypot_load_textdomain() {
79
  * This lets CF7 know about Mr. Honeypot.
80
  *
81
  */
82
+ add_action('wpcf7_init', 'wpcf7_add_form_tag_honeypot', 10);
83
+ function wpcf7_add_form_tag_honeypot() {
84
+
85
+ // Test if new 4.6+ functions exists
86
+ if (function_exists('wpcf7_add_form_tag')) {
87
+ wpcf7_add_form_tag( 'honeypot', 'wpcf7_honeypot_formtag_handler', true );
88
+ } else {
89
+ wpcf7_add_shortcode( 'honeypot', 'wpcf7_honeypot_formtag_handler', true );
90
+ }
91
  }
92
 
93
 
94
  /**
95
  *
96
+ * Form Tag handler
97
  * This is where we generate the honeypot HTML from the shortcode options
98
  *
99
  */
100
+ function wpcf7_honeypot_formtag_handler( $tag ) {
101
+
102
+ // Test if new 4.6+ functions exists
103
+ $tag = (class_exists('WPCF7_FormTag')) ? new WPCF7_FormTag( $tag ) : new WPCF7_Shortcode( $tag );
104
 
105
  if ( empty( $tag->name ) )
106
  return '';
140
  add_filter( 'wpcf7_validate_honeypot', 'wpcf7_honeypot_filter' ,10,2);
141
 
142
  function wpcf7_honeypot_filter ( $result, $tag ) {
143
+
144
+ // Test if new 4.6+ functions exists
145
+ $tag = (class_exists('WPCF7_FormTag')) ? new WPCF7_FormTag( $tag ) : new WPCF7_Shortcode( $tag );
146
 
147
  $name = $tag->name;
148
 
languages/contact-form-7-honeypot-fr_FR.mo DELETED
Binary file
languages/contact-form-7-honeypot-fr_FR.po DELETED
@@ -1,111 +0,0 @@
1
- # Copyright (C) 2016 Contact Form 7 Honeypot
2
- # This file is distributed under the same license as the Contact Form 7 Honeypot package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: Contact Form 7 Honeypot 1.8\n"
6
- "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/contact-form-7-"
7
- "honeypot\n"
8
- "POT-Creation-Date: 2016-04-09 10:51+0200\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2016-04-09 13:19+0200\n"
13
- "Language-Team: \n"
14
- "X-Generator: Poedit 1.8.7\n"
15
- "Last-Translator: Christophe Perrin <christophe@kaeness.fr>\n"
16
- "Plural-Forms: nplurals=2; plural=(n > 1);\n"
17
- "Language: fr_FR\n"
18
-
19
- #: honeypot.php:55
20
- msgid "%s must be installed and activated for the CF7 Honeypot plugin to work"
21
- msgstr ""
22
- "%s doit être installé et activé pour que l&rsquo;extension CF7 Honeypot "
23
- "puisse fonctionner"
24
-
25
- #: honeypot.php:95
26
- msgid "Please leave this field empty."
27
- msgstr "Merci de laisser ce champ vide."
28
-
29
- #: honeypot.php:149 honeypot.php:151
30
- msgid "Honeypot"
31
- msgstr "Honeypot"
32
-
33
- #: honeypot.php:158
34
- msgid ""
35
- "Generate a form-tag for a spam-stopping honeypot field. For more details, "
36
- "see %s."
37
- msgstr ""
38
- "Crée une balise de formulaire pour un champ anti-spam «&nbsp;Pot de "
39
- "miel&nbsp;». Pour plus de détails, voir %s"
40
-
41
- #: honeypot.php:159
42
- msgid "CF7 Honeypot"
43
- msgstr "CF7 Honeypot"
44
-
45
- #: honeypot.php:168 honeypot.php:223
46
- msgid "Name"
47
- msgstr "Nom"
48
-
49
- #: honeypot.php:172 honeypot.php:225
50
- msgid ""
51
- "For better security, change \"honeypot\" to something less bot-recognizable."
52
- msgstr ""
53
- "Pour une meilleure sécurité, modifiez «&nbsp;honeypot&nbsp;» en quelque "
54
- "chose de moins reconnaissable par les robots."
55
-
56
- #: honeypot.php:178 honeypot.php:236
57
- msgid "ID (optional)"
58
- msgstr "ID (optionnel)"
59
-
60
- #: honeypot.php:187 honeypot.php:240
61
- msgid "Class (optional)"
62
- msgstr "Classe CSS (optionnel)"
63
-
64
- #: honeypot.php:196 honeypot.php:246
65
- msgid "Don't Use Accessibility Message (optional)"
66
- msgstr "Ne pas utiliser le message pour l&rsquo;accessibilité (optionnel)"
67
-
68
- #: honeypot.php:200 honeypot.php:247
69
- msgid ""
70
- "If checked, the accessibility message will not be generated. <strong>This is "
71
- "not recommended</strong>. If you're unsure, leave this unchecked."
72
- msgstr ""
73
- "Si cochée, le message pour l&rsquo;accessibilité ne sera pas généré. "
74
- "<strong>Ce n&rsquo;est pas recommandé.</strong> Si vous n&rsquo;êtes pas "
75
- "sûr, ne cochez pas cette case."
76
-
77
- # 'Insérer la balise' is too long for the button size
78
- #: honeypot.php:212
79
- msgid "Insert Tag"
80
- msgstr "Insérer"
81
-
82
- #: honeypot.php:256
83
- msgid "Copy this code and paste it into the form left."
84
- msgstr "Copiez ce code et collez-le dans le formulaire à gauche."
85
-
86
- #. Plugin Name of the plugin/theme
87
- msgid "Contact Form 7 Honeypot"
88
- msgstr "Contact Form 7 Honeypot"
89
-
90
- #. Plugin URI of the plugin/theme
91
- msgid ""
92
- "http://www.nocean.ca/plugins/honeypot-module-for-contact-form-7-wordpress-"
93
- "plugin/"
94
- msgstr ""
95
- "http://www.nocean.ca/plugins/honeypot-module-for-contact-form-7-wordpress-"
96
- "plugin/"
97
-
98
- #. Description of the plugin/theme
99
- msgid ""
100
- "Add honeypot anti-spam functionality to the popular Contact Form 7 plugin."
101
- msgstr ""
102
- "Ajoute la fonctionnalité anti-spam «&nbsp;Pot de miel&nbsp;» à l&rsquo;"
103
- "extension Contact Form 7."
104
-
105
- #. Author of the plugin/theme
106
- msgid "Nocean"
107
- msgstr "Nocean"
108
-
109
- #. Author URI of the plugin/theme
110
- msgid "http://www.nocean.ca"
111
- msgstr "http://www.nocean.ca"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/contact-form-7-honeypot.pot DELETED
@@ -1,94 +0,0 @@
1
- # Copyright (C) 2016 Contact Form 7 Honeypot
2
- # This file is distributed under the same license as the Contact Form 7 Honeypot package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: Contact Form 7 Honeypot 1.8\n"
6
- "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/contact-form-7-"
7
- "honeypot\n"
8
- "POT-Creation-Date: 2016-02-04 18:24:35+00:00\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
- "Language-Team: LANGUAGE <LL@li.org>\n"
15
-
16
- #: honeypot.php:55
17
- msgid "%s must be installed and activated for the CF7 Honeypot plugin to work"
18
- msgstr ""
19
-
20
- #: honeypot.php:95
21
- msgid "Please leave this field empty."
22
- msgstr ""
23
-
24
- #: honeypot.php:149 honeypot.php:151
25
- msgid "Honeypot"
26
- msgstr ""
27
-
28
- #: honeypot.php:158
29
- msgid ""
30
- "Generate a form-tag for a spam-stopping honeypot field. For more details, "
31
- "see %s."
32
- msgstr ""
33
-
34
- #: honeypot.php:159
35
- msgid "CF7 Honeypot"
36
- msgstr ""
37
-
38
- #: honeypot.php:168 honeypot.php:223
39
- msgid "Name"
40
- msgstr ""
41
-
42
- #: honeypot.php:172 honeypot.php:225
43
- msgid ""
44
- "For better security, change \"honeypot\" to something less bot-recognizable."
45
- msgstr ""
46
-
47
- #: honeypot.php:178 honeypot.php:236
48
- msgid "ID (optional)"
49
- msgstr ""
50
-
51
- #: honeypot.php:187 honeypot.php:240
52
- msgid "Class (optional)"
53
- msgstr ""
54
-
55
- #: honeypot.php:196 honeypot.php:246
56
- msgid "Don't Use Accessibility Message (optional)"
57
- msgstr ""
58
-
59
- #: honeypot.php:200 honeypot.php:247
60
- msgid ""
61
- "If checked, the accessibility message will not be generated. <strong>This is "
62
- "not recommended</strong>. If you're unsure, leave this unchecked."
63
- msgstr ""
64
-
65
- #: honeypot.php:212
66
- msgid "Insert Tag"
67
- msgstr ""
68
-
69
- #: honeypot.php:256
70
- msgid "Copy this code and paste it into the form left."
71
- msgstr ""
72
-
73
- #. Plugin Name of the plugin/theme
74
- msgid "Contact Form 7 Honeypot"
75
- msgstr ""
76
-
77
- #. Plugin URI of the plugin/theme
78
- msgid ""
79
- "http://www.nocean.ca/plugins/honeypot-module-for-contact-form-7-wordpress-"
80
- "plugin/"
81
- msgstr ""
82
-
83
- #. Description of the plugin/theme
84
- msgid ""
85
- "Add honeypot anti-spam functionality to the popular Contact Form 7 plugin."
86
- msgstr ""
87
-
88
- #. Author of the plugin/theme
89
- msgid "Nocean"
90
- msgstr ""
91
-
92
- #. Author URI of the plugin/theme
93
- msgid "http://www.nocean.ca"
94
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/readme.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ Translations have moved to
2
+ https://translate.wordpress.org/projects/wp-plugins/contact-form-7-honeypot
3
+
4
+ Thank you for your contribution.
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
  === Contact Form 7 Honeypot ===
2
  Tags: honeypot, antispam, captcha, spam, form, forms, contact form 7, contactform7, contact form, cf7, cforms, Contact Forms 7, Contact Forms, contacts
3
  Requires at least: 3.5
4
- Tested up to: 4.5
5
- Stable tag: 1.9
6
  Contributors: DaoByDesign
7
  Donate link: http://www.nocean.ca/buy-us-a-coffee/
8
  License: GPLv2 or later
@@ -23,7 +23,7 @@ Follow us on [Twitter](https://twitter.com/NoceanCA) and on [Facebook](https://w
23
  Visit the [Contact Form 7 Honeypot plugin page](http://www.nocean.ca/plugins/honeypot-module-for-contact-form-7-wordpress-plugin/) for additional information or to [buy us a coffee](http://www.nocean.ca/buy-us-a-coffee/) to say thanks.
24
 
25
  = Localization/Translation =
26
- If you'd like to translate this plugin, please [send us your .PO files](mailto:hello@nocean.ca). The plugin's base .POT file is [available here](http://plugins.svn.wordpress.org/contact-form-7-honeypot/trunk/languages/).
27
 
28
  = IMPORTANT NOTES: =
29
  If you are using CF7 3.6+, use the latest version of this plugin. If you are using an older version of CF7, you will need to use [CF7 Honeypot v1.3](http://downloads.wordpress.org/plugin/contact-form-7-honeypot.1.3.zip).
@@ -64,6 +64,9 @@ For examples of the above, please see this [recipe Gist](https://gist.github.com
64
  * Yep! See the **Installation** section for more details and [this Gist](https://gist.github.com/nocean/953b1362b63bd3ecf68c) for examples.
65
 
66
  == Changelog ==
 
 
 
67
  = 1.9 =
68
  Added i18n support, French language pack. Thx chris-kns
69
 
1
  === Contact Form 7 Honeypot ===
2
  Tags: honeypot, antispam, captcha, spam, form, forms, contact form 7, contactform7, contact form, cf7, cforms, Contact Forms 7, Contact Forms, contacts
3
  Requires at least: 3.5
4
+ Tested up to: 4.7
5
+ Stable tag: 1.10
6
  Contributors: DaoByDesign
7
  Donate link: http://www.nocean.ca/buy-us-a-coffee/
8
  License: GPLv2 or later
23
  Visit the [Contact Form 7 Honeypot plugin page](http://www.nocean.ca/plugins/honeypot-module-for-contact-form-7-wordpress-plugin/) for additional information or to [buy us a coffee](http://www.nocean.ca/buy-us-a-coffee/) to say thanks.
24
 
25
  = Localization/Translation =
26
+ If you'd like to translate this plugin, please visit the plugin's [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/contact-form-7-honeypot) page. As of v1.10, all translation is handled there. Thank you to the polyglots that contribute!
27
 
28
  = IMPORTANT NOTES: =
29
  If you are using CF7 3.6+, use the latest version of this plugin. If you are using an older version of CF7, you will need to use [CF7 Honeypot v1.3](http://downloads.wordpress.org/plugin/contact-form-7-honeypot.1.3.zip).
64
  * Yep! See the **Installation** section for more details and [this Gist](https://gist.github.com/nocean/953b1362b63bd3ecf68c) for examples.
65
 
66
  == Changelog ==
67
+ = 1.10 =
68
+ Updates for Function/Class changes related to CF7 4.6. Removed plugin local language support, instead use translate.wordpress.org.
69
+
70
  = 1.9 =
71
  Added i18n support, French language pack. Thx chris-kns
72