Version Description
Introduces ability to force W3C compliance. See here for details.
Download this release
Release Info
Developer | DaoByDesign |
Plugin | Contact Form 7 Honeypot |
Version | 1.12 |
Comparing to | |
See all releases |
Code changes from version 1.11 to 1.12
- honeypot.php +15 -2
- readme.txt +8 -1
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 |
*/
|
@@ -115,16 +115,19 @@ function wpcf7_honeypot_formtag_handler( $tag ) {
|
|
115 |
$atts['message'] = apply_filters('wpcf7_honeypot_accessibility_message', __('Please leave this field empty.','contact-form-7-honeypot'));
|
116 |
$atts['name'] = $tag->name;
|
117 |
$atts['type'] = $tag->type;
|
|
|
118 |
$atts['nomessage'] = $tag->get_option('nomessage');
|
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="
|
128 |
$html .= $validation_error . '</span>';
|
129 |
|
130 |
// Hook for filtering finished Honeypot form element.
|
@@ -214,6 +217,16 @@ function wpcf7_tg_pane_honeypot($contact_form, $args = '') {
|
|
214 |
</td>
|
215 |
</tr>
|
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>
|
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.12
|
9 |
Text Domain: contact-form-7-honeypot
|
10 |
Domain Path: /languages/
|
11 |
*/
|
115 |
$atts['message'] = apply_filters('wpcf7_honeypot_accessibility_message', __('Please leave this field empty.','contact-form-7-honeypot'));
|
116 |
$atts['name'] = $tag->name;
|
117 |
$atts['type'] = $tag->type;
|
118 |
+
$atts['validautocomplete'] = $tag->get_option('validautocomplete');
|
119 |
$atts['nomessage'] = $tag->get_option('nomessage');
|
120 |
$atts['validation_error'] = $validation_error;
|
121 |
$atts['css'] = apply_filters('wpcf7_honeypot_container_css', 'display:none !important; visibility:hidden !important;');
|
122 |
$inputid = (!empty($atts['id'])) ? 'id="'.$atts['id'].'" ' : '';
|
123 |
$inputid_for = ($inputid) ? 'for="'.$atts['id'].'" ' : '';
|
124 |
+
$autocomplete_value = ($atts['validautocomplete']) ? 'off' : 'nope';
|
125 |
+
|
126 |
$html = '<span class="wpcf7-form-control-wrap ' . $atts['name'] . '-wrap" style="'.$atts['css'].'">';
|
127 |
if (!$atts['nomessage']) {
|
128 |
$html .= '<label ' . $inputid_for . ' class="hp-message">'.$atts['message'].'</label>';
|
129 |
}
|
130 |
+
$html .= '<input ' . $inputid . 'class="' . $atts['class'] . '" type="text" name="' . $atts['name'] . '" value="" size="40" tabindex="-1" autocomplete="'.$autocomplete_value.'" />';
|
131 |
$html .= $validation_error . '</span>';
|
132 |
|
133 |
// Hook for filtering finished Honeypot form element.
|
217 |
</td>
|
218 |
</tr>
|
219 |
|
220 |
+
<tr>
|
221 |
+
<th scope="row">
|
222 |
+
<label for="<?php echo esc_attr( $args['content'] . '-validautocomplete' ); ?>"><?php echo esc_html( __( 'Use W3C Valid Autocomplete (optional)', 'contact-form-7-honeypot' ) ); ?></label>
|
223 |
+
</th>
|
224 |
+
<td>
|
225 |
+
<input type="checkbox" name="validautocomplete:true" id="<?php echo esc_attr( $args['content'] . '-validautocomplete' ); ?>" class="validautocompletevalue option" /><br />
|
226 |
+
<em><?php echo __('See <a href="https://wordpress.org/support/topic/w3c-validation-in-1-11-explanation-and-work-arounds/" target="_blank" rel="noopener">here</a> for more details. If you\'re unsure, leave this unchecked.','contact-form-7-honeypot'); ?></em>
|
227 |
+
</td>
|
228 |
+
</tr>
|
229 |
+
|
230 |
<tr>
|
231 |
<th scope="row">
|
232 |
<label for="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>"><?php echo esc_html( __( 'Disable Accessibility Label (optional)', 'contact-form-7-honeypot' ) ); ?></label>
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
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.
|
6 |
Contributors: DaoByDesign
|
7 |
Donate link: http://www.nocean.ca/buy-us-a-coffee/
|
8 |
License: GPLv2 or later
|
@@ -63,7 +63,14 @@ For examples of the above, please see this [recipe Gist](https://gist.github.com
|
|
63 |
|
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 |
|
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.12
|
6 |
Contributors: DaoByDesign
|
7 |
Donate link: http://www.nocean.ca/buy-us-a-coffee/
|
8 |
License: GPLv2 or later
|
63 |
|
64 |
* Yep! See the **Installation** section for more details and [this Gist](https://gist.github.com/nocean/953b1362b63bd3ecf68c) for examples.
|
65 |
|
66 |
+
= My form is not validating with a W3C validation tool =
|
67 |
+
|
68 |
+
* This is by design, and we recommend leaving this validation error for enhanced improvement of the plugin. However, there is a simple work around. See [here](https://wordpress.org/support/topic/w3c-validation-in-1-11-explanation-and-work-arounds/) for details.
|
69 |
+
|
70 |
== Changelog ==
|
71 |
+
= 1.12 =
|
72 |
+
Introduces ability to force W3C compliance. See [here](https://wordpress.org/support/topic/w3c-validation-in-1-11-explanation-and-work-arounds/) for details.
|
73 |
+
|
74 |
= 1.11 =
|
75 |
Addresses accessibility concerns regarding a missing label and disables autocomplete to prevent browser autocomplete functions from filling in the field.
|
76 |
|