Version Description
Addresses accessibility concerns regarding a missing label and disables autocomplete to prevent browser autocomplete functions from filling in the field.
Download this release
Release Info
Developer | DaoByDesign |
Plugin | Contact Form 7 Honeypot |
Version | 1.11 |
Comparing to | |
See all releases |
Code changes from version 1.10 to 1.11
- honeypot.php +7 -6
- readme.txt +5 -2
honeypot.php
CHANGED
@@ -5,7 +5,7 @@ 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 |
Text Domain: contact-form-7-honeypot
|
10 |
Domain Path: /languages/
|
11 |
*/
|
@@ -119,11 +119,12 @@ function wpcf7_honeypot_formtag_handler( $tag ) {
|
|
119 |
$atts['validation_error'] = $validation_error;
|
120 |
$atts['css'] = apply_filters('wpcf7_honeypot_container_css', 'display:none !important; visibility:hidden !important;');
|
121 |
$inputid = (!empty($atts['id'])) ? 'id="'.$atts['id'].'" ' : '';
|
|
|
122 |
$html = '<span class="wpcf7-form-control-wrap ' . $atts['name'] . '-wrap" style="'.$atts['css'].'">';
|
123 |
-
$html .= '<input ' . $inputid . 'class="' . $atts['class'] . '" type="text" name="' . $atts['name'] . '" value="" size="40" tabindex="-1" />';
|
124 |
if (!$atts['nomessage']) {
|
125 |
-
$html .= '<
|
126 |
}
|
|
|
127 |
$html .= $validation_error . '</span>';
|
128 |
|
129 |
// Hook for filtering finished Honeypot form element.
|
@@ -191,7 +192,7 @@ function wpcf7_tg_pane_honeypot($contact_form, $args = '') {
|
|
191 |
</th>
|
192 |
<td>
|
193 |
<input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr( $args['content'] . '-name' ); ?>" /><br>
|
194 |
-
<em><?php echo esc_html( __( 'For better security, change "honeypot" to something
|
195 |
</td>
|
196 |
</tr>
|
197 |
|
@@ -215,11 +216,11 @@ function wpcf7_tg_pane_honeypot($contact_form, $args = '') {
|
|
215 |
|
216 |
<tr>
|
217 |
<th scope="row">
|
218 |
-
<label for="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>"><?php echo esc_html( __( '
|
219 |
</th>
|
220 |
<td>
|
221 |
<input type="checkbox" name="nomessage:true" id="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>" class="messagekillvalue option" /><br />
|
222 |
-
<em><?php echo __('If checked, the accessibility
|
223 |
</td>
|
224 |
</tr>
|
225 |
|
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.11
|
9 |
Text Domain: contact-form-7-honeypot
|
10 |
Domain Path: /languages/
|
11 |
*/
|
119 |
$atts['validation_error'] = $validation_error;
|
120 |
$atts['css'] = apply_filters('wpcf7_honeypot_container_css', 'display:none !important; visibility:hidden !important;');
|
121 |
$inputid = (!empty($atts['id'])) ? 'id="'.$atts['id'].'" ' : '';
|
122 |
+
$inputid_for = ($inputid) ? 'for="'.$atts['id'].'" ' : '';
|
123 |
$html = '<span class="wpcf7-form-control-wrap ' . $atts['name'] . '-wrap" style="'.$atts['css'].'">';
|
|
|
124 |
if (!$atts['nomessage']) {
|
125 |
+
$html .= '<label ' . $inputid_for . ' class="hp-message">'.$atts['message'].'</label>';
|
126 |
}
|
127 |
+
$html .= '<input ' . $inputid . 'class="' . $atts['class'] . '" type="text" name="' . $atts['name'] . '" value="" size="40" tabindex="-1" autocomplete="nope" />';
|
128 |
$html .= $validation_error . '</span>';
|
129 |
|
130 |
// Hook for filtering finished Honeypot form element.
|
192 |
</th>
|
193 |
<td>
|
194 |
<input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr( $args['content'] . '-name' ); ?>" /><br>
|
195 |
+
<em><?php echo esc_html( __( 'This can be anything, but should be changed from the default generated "honeypot". For better security, change "honeypot" to something more appealing to a bot, such as text including "email" or "website".', 'contact-form-7-honeypot' ) ); ?></em>
|
196 |
</td>
|
197 |
</tr>
|
198 |
|
216 |
|
217 |
<tr>
|
218 |
<th scope="row">
|
219 |
+
<label for="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>"><?php echo esc_html( __( 'Disable Accessibility Label (optional)', 'contact-form-7-honeypot' ) ); ?></label>
|
220 |
</th>
|
221 |
<td>
|
222 |
<input type="checkbox" name="nomessage:true" id="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>" class="messagekillvalue option" /><br />
|
223 |
+
<em><?php echo __('If checked, the accessibility label will not be generated. <strong>This is not recommended</strong>. If you\'re unsure, leave this unchecked.','contact-form-7-honeypot'); ?></em>
|
224 |
</td>
|
225 |
</tr>
|
226 |
|
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 |
-
Stable tag: 1.
|
6 |
Contributors: DaoByDesign
|
7 |
Donate link: http://www.nocean.ca/buy-us-a-coffee/
|
8 |
License: GPLv2 or later
|
@@ -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.10 =
|
68 |
Updates for Function/Class changes related to CF7 4.6. Removed plugin local language support, instead use translate.wordpress.org.
|
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.8.2
|
5 |
+
Stable tag: 1.11
|
6 |
Contributors: DaoByDesign
|
7 |
Donate link: http://www.nocean.ca/buy-us-a-coffee/
|
8 |
License: GPLv2 or later
|
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.11 =
|
68 |
+
Addresses accessibility concerns regarding a missing label and disables autocomplete to prevent browser autocomplete functions from filling in the field.
|
69 |
+
|
70 |
= 1.10 =
|
71 |
Updates for Function/Class changes related to CF7 4.6. Removed plugin local language support, instead use translate.wordpress.org.
|
72 |
|