Version Description
Replaced text domain constant with plain string for better i18n compatability in some plugins.
Download this release
Release Info
Developer | nocean |
Plugin | Contact Form 7 Honeypot |
Version | 2.0.2 |
Comparing to | |
See all releases |
Code changes from version 2.0.1 to 2.0.2
- honeypot.php +2 -4
- includes/admin.php +24 -24
- includes/honeypot4cf7.php +20 -20
- readme.txt +9 -0
honeypot.php
CHANGED
@@ -5,13 +5,12 @@ 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: 2.0.
|
9 |
Text Domain: contact-form-7-honeypot
|
10 |
Domain Path: /languages/
|
11 |
*/
|
12 |
|
13 |
-
define( 'HONEYPOT4CF7_VERSION', '2.0.
|
14 |
-
define( 'HONEYPOT4CF7_TEXT_DOMAIN', 'contact-form-7-honeypot' );
|
15 |
define( 'HONEYPOT4CF7_PLUGIN', __FILE__ );
|
16 |
define( 'HONEYPOT4CF7_PLUGIN_BASENAME', plugin_basename( HONEYPOT4CF7_PLUGIN ) );
|
17 |
define( 'HONEYPOT4CF7_PLUGIN_NAME', trim( dirname( HONEYPOT4CF7_PLUGIN_BASENAME ), '/' ) );
|
@@ -19,6 +18,5 @@ define( 'HONEYPOT4CF7_PLUGIN_DIR', untrailingslashit( dirname( HONEYPOT4CF7_PLUG
|
|
19 |
define( 'HONEYPOT4CF7_PLUGIN_DIR_URL', untrailingslashit( plugin_dir_url( HONEYPOT4CF7_PLUGIN ) ) );
|
20 |
define( 'HONEYPOT4CF7_DEP_PLUGIN', 'contact-form-7/wp-contact-form-7.php' );
|
21 |
|
22 |
-
|
23 |
require_once HONEYPOT4CF7_PLUGIN_DIR . '/includes/admin.php';
|
24 |
require_once HONEYPOT4CF7_PLUGIN_DIR . '/includes/honeypot4cf7.php';
|
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: 2.0.2
|
9 |
Text Domain: contact-form-7-honeypot
|
10 |
Domain Path: /languages/
|
11 |
*/
|
12 |
|
13 |
+
define( 'HONEYPOT4CF7_VERSION', '2.0.2' );
|
|
|
14 |
define( 'HONEYPOT4CF7_PLUGIN', __FILE__ );
|
15 |
define( 'HONEYPOT4CF7_PLUGIN_BASENAME', plugin_basename( HONEYPOT4CF7_PLUGIN ) );
|
16 |
define( 'HONEYPOT4CF7_PLUGIN_NAME', trim( dirname( HONEYPOT4CF7_PLUGIN_BASENAME ), '/' ) );
|
18 |
define( 'HONEYPOT4CF7_PLUGIN_DIR_URL', untrailingslashit( plugin_dir_url( HONEYPOT4CF7_PLUGIN ) ) );
|
19 |
define( 'HONEYPOT4CF7_DEP_PLUGIN', 'contact-form-7/wp-contact-form-7.php' );
|
20 |
|
|
|
21 |
require_once HONEYPOT4CF7_PLUGIN_DIR . '/includes/admin.php';
|
22 |
require_once HONEYPOT4CF7_PLUGIN_DIR . '/includes/honeypot4cf7.php';
|
includes/admin.php
CHANGED
@@ -30,7 +30,7 @@ function honeypot4cf7_nocf7_notice() { ?>
|
|
30 |
<div class="notice error honeypot4cf7-notice is-dismissible">
|
31 |
<p>
|
32 |
<?php printf(
|
33 |
-
__('%s must be installed and activated for the CF7 Honeypot plugin to work',
|
34 |
'<a href="'.admin_url('plugin-install.php?tab=search&s=contact+form+7').'">Contact Form 7</a>'
|
35 |
); ?>
|
36 |
</p>
|
@@ -146,7 +146,7 @@ function honeypot4cf7_admin_page() {
|
|
146 |
// Reset Values
|
147 |
if (!empty($_POST['clear'])) {
|
148 |
honeypot4cf7_restore_config('reset');
|
149 |
-
echo '<div id="message" class="updated"><p>'.esc_html(__('The settings have been reset to their defaults.',
|
150 |
}
|
151 |
|
152 |
// Get Options
|
@@ -172,88 +172,88 @@ function honeypot4cf7_admin_page() {
|
|
172 |
|
173 |
update_option( 'honeypot4cf7_config', $honeypot4cf7_config );
|
174 |
|
175 |
-
echo '<div id="message" class="updated"><p>'.esc_html(__('The changes have been saved.',
|
176 |
}
|
177 |
}
|
178 |
?>
|
179 |
|
180 |
<div class="wrap" class="honeypot4cf7-admin" id="honeypot4cf7-admin-page">
|
181 |
-
<h1 class="honeypot4cf7-admin__title"><?php esc_html_e(__('Honeypot for Contact Form 7'),
|
182 |
<div class="honeypot4cf7-admin__primary">
|
183 |
<div class="honeypot4cf7-admin__box">
|
184 |
<form action="" method="post" id="honeypot4cf7_options_form" name="honeypot4cf7_options_form">
|
185 |
<?php wp_nonce_field('honeypot4cf7-submit', 'honeypot4cf7_nonce'); ?>
|
186 |
<a href="https://wordpress.org/support/plugin/contact-form-7-honeypot/" target="_blank" class="honeypot4cf7_admin__support-link">
|
187 |
<span class="dashicons dashicons-editor-help"></span>
|
188 |
-
<?php esc_html_e( __( 'Get Support',
|
189 |
</a>
|
190 |
<h3><span class="dashicons dashicons-admin-generic"></span> <?php esc_html_e('Honeypot Settings'); ?></h3>
|
191 |
<table class="form-table">
|
192 |
<tbody>
|
193 |
<tr valign="top">
|
194 |
-
<th><label for="honeypot4cf7__store-honeypot"><?php esc_html_e( __( 'Store Honeypot Value',
|
195 |
<td>
|
196 |
<input type="checkbox" name="honeypot4cf7_store" id="honeypot4cf7__store-honeypot" value="1" <?php checked($honeypot4cf7_config['store_honeypot'],1); ?>>
|
197 |
</td>
|
198 |
</tr>
|
199 |
<tr valign="top">
|
200 |
-
<td class="description" colspan="2"><?php printf(__( '(Recommended) By default the Honeypot field is not stored with other fields in form-saving plugins like %1$s. However, saving the field can be useful to see what spam bots are leaving behind to help you improve your spam stopping superpowers. If you\'d like to store the value of the field, simply check this box (and install %1$s).',
|
201 |
</tr>
|
202 |
|
203 |
<tr valign="top">
|
204 |
-
<th><label for="honeypot4cf7__placeholder"><?php esc_html_e( __( 'Global Placeholder',
|
205 |
<td>
|
206 |
<input type="text" class="regular-text" name="honeypot4cf7_placeholder" id="honeypot4cf7__placeholder" value="<?php echo sanitize_text_field($honeypot4cf7_config['placeholder']); ?>">
|
207 |
</td>
|
208 |
</tr>
|
209 |
<tr valign="top">
|
210 |
-
<td class="description" colspan="2"><?php esc_html_e( __( 'If using placeholders on other fields, this can help honeypot mimic a "real" field. This can be overridden in the contact form. If you\'re unsure, leave blank.',
|
211 |
</tr>
|
212 |
|
213 |
<tr valign="top">
|
214 |
-
<th><label for="honeypot4cf7__accessibility_message"><?php esc_html_e( __( 'Accessibility Message',
|
215 |
<td>
|
216 |
<input type="text" class="regular-text" name="honeypot4cf7_accessibility_message" id="honeypot4cf7__accessibility_message" value="<?php echo sanitize_text_field($honeypot4cf7_config['accessibility_message']); ?>">
|
217 |
</td>
|
218 |
</tr>
|
219 |
<tr valign="top">
|
220 |
-
<td class="description" colspan="2"><?php printf(__( 'You can customize the (hidden) accessibility message, or just leave it the default value: %1$s',
|
221 |
</tr>
|
222 |
|
223 |
<tr valign="top">
|
224 |
-
<th><label for="honeypot4cf7__w3c-valid-autocomplete"><?php esc_html_e( __( 'Use Standard Autocomplete Value',
|
225 |
<td>
|
226 |
<input type="checkbox" name="honeypot4cf7_w3c_valid_autocomplete[]" id="honeypot4cf7__w3c-valid-autocomplete" value="true" <?php checked($honeypot4cf7_config['w3c_valid_autocomplete'][0],'true'); ?>>
|
227 |
</td>
|
228 |
</tr>
|
229 |
<tr valign="top">
|
230 |
-
<td class="description" colspan="2"><?php esc_html_e(__( 'To assure the honeypot isn\'t auto-completed by a browser, we add an atypical "autocomplete" attribute value. If you have any problems with this, you can switch it to the more standard (but less effective) "off" value. If you\'re unsure, leave this unchecked.',
|
231 |
</tr>
|
232 |
|
233 |
<tr valign="top">
|
234 |
-
<th><label for="honeypot4cf7__move_inline_css"><?php esc_html_e( __( 'Move Inline CSS',
|
235 |
<td>
|
236 |
<input type="checkbox" name="honeypot4cf7_move_inline_css[]" id="honeypot4cf7__move_inline_css" value="true" <?php checked($honeypot4cf7_config['move_inline_css'][0],'true'); ?>>
|
237 |
</td>
|
238 |
</tr>
|
239 |
<tr valign="top">
|
240 |
-
<td class="description" colspan="2"><?php esc_html_e(__( 'By default Honeypot uses inline CSS on the honeypot field to hide it. Checking this box moves that CSS to the footer of the page. It may help confuse bots.',
|
241 |
</tr>
|
242 |
|
243 |
<tr valign="top">
|
244 |
-
<th><label for="honeypot4cf7__nomessage"><?php esc_html_e( __( 'Disable Accessibility Label',
|
245 |
<td>
|
246 |
<input type="checkbox" name="honeypot4cf7_nomessage[]" id="honeypot4cf7__nomessage" value="true" <?php checked($honeypot4cf7_config['nomessage'][0],'true'); ?>>
|
247 |
</td>
|
248 |
</tr>
|
249 |
<tr valign="top">
|
250 |
-
<td class="description" colspan="2"><?php esc_html_e(__( 'If checked, the accessibility label will not be generated. This is not recommended, but may improve spam blocking. If you\'re unsure, leave this unchecked.',
|
251 |
</tr>
|
252 |
</tbody>
|
253 |
</table>
|
254 |
<p class="submit">
|
255 |
-
<input name="save" id="save" class="button button-primary" value="<?php esc_html_e( __( 'Save',
|
256 |
-
<input name="clear" id="reset" class="button" value="<?php esc_html_e( __( 'Reset to Defaults',
|
257 |
|
258 |
</p>
|
259 |
</form>
|
@@ -267,7 +267,7 @@ function honeypot4cf7_admin_page() {
|
|
267 |
<div class="honeypot4cf7-admin__box honeypot4cf7-admin__box--count-message">
|
268 |
<p>
|
269 |
<span class="dashicons dashicons-chart-area"></span> <?php printf(
|
270 |
-
__('Honeypot has stopped %1$s spam submissions since %2$s',
|
271 |
'<strong>'.$honeypot4cf7_config['honeypot_count'].'</strong>',
|
272 |
date(get_option('date_format'), $honeypot4cf7_config['honeypot_install_date'])
|
273 |
); ?>
|
@@ -278,16 +278,16 @@ function honeypot4cf7_admin_page() {
|
|
278 |
<div class="honeypot4cf7-admin__secondary">
|
279 |
<div class="honeypot4cf7-admin__box honeypot4cf7-admin__box--coffee">
|
280 |
<p class="honeypot4cf7-admin__coffee-message">
|
281 |
-
<?php esc_html_e(__( 'Do you like Honeypot for CF7? Consider showing your support:',
|
282 |
<a href="http://www.nocean.ca/buy-us-a-coffee/" target="_blank" class="button button-primary"><strong>
|
283 |
-
<span class="dashicons dashicons-coffee"></span> <?php esc_html_e(__('Buy Us a Coffee',
|
284 |
</strong></a>
|
285 |
</p>
|
286 |
</div>
|
287 |
<div class="honeypot4cf7-admin__box">
|
288 |
<p class="honeypot4cf7__banner-ad-message">
|
289 |
<?php printf(
|
290 |
-
__( 'We use %s and find it incredibly valuable. If you choose to use them too (even for free), you are helping continued development and support of this plugin. Thank you!',
|
291 |
'<a href="https://shareasale.com/r.cfm?b=1537039&u=2748065&m=97231&urllink=&afftrack=0" target="_blank">Semrush</a>'
|
292 |
); ?>
|
293 |
</p>
|
@@ -298,7 +298,7 @@ function honeypot4cf7_admin_page() {
|
|
298 |
|
299 |
<div class="honeypot4cf7-admin__box honeypot4cf7-admin__rate-us">
|
300 |
<div class="honeypot4cf7-admin__stars"><a target="_blank" href="https://wordpress.org/support/plugin/contact-form-7-honeypot/reviews/?filter=5#new-post"><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a></div>
|
301 |
-
<?php printf(__('Please rate us on %1$s. Thanks!!',
|
302 |
</div>
|
303 |
</div>
|
304 |
</div>
|
30 |
<div class="notice error honeypot4cf7-notice is-dismissible">
|
31 |
<p>
|
32 |
<?php printf(
|
33 |
+
__('%s must be installed and activated for the CF7 Honeypot plugin to work', 'contact-form-7-honeypot'),
|
34 |
'<a href="'.admin_url('plugin-install.php?tab=search&s=contact+form+7').'">Contact Form 7</a>'
|
35 |
); ?>
|
36 |
</p>
|
146 |
// Reset Values
|
147 |
if (!empty($_POST['clear'])) {
|
148 |
honeypot4cf7_restore_config('reset');
|
149 |
+
echo '<div id="message" class="updated"><p>'.esc_html(__('The settings have been reset to their defaults.','contact-form-7-honeypot')).'</p></div>';
|
150 |
}
|
151 |
|
152 |
// Get Options
|
172 |
|
173 |
update_option( 'honeypot4cf7_config', $honeypot4cf7_config );
|
174 |
|
175 |
+
echo '<div id="message" class="updated"><p>'.esc_html(__('The changes have been saved.','contact-form-7-honeypot')).'</p></div>';
|
176 |
}
|
177 |
}
|
178 |
?>
|
179 |
|
180 |
<div class="wrap" class="honeypot4cf7-admin" id="honeypot4cf7-admin-page">
|
181 |
+
<h1 class="honeypot4cf7-admin__title"><?php esc_html_e(__('Honeypot for Contact Form 7'),'contact-form-7-honeypot'); ?> <span><?php esc_html_e('v'.HONEYPOT4CF7_VERSION); ?></h1>
|
182 |
<div class="honeypot4cf7-admin__primary">
|
183 |
<div class="honeypot4cf7-admin__box">
|
184 |
<form action="" method="post" id="honeypot4cf7_options_form" name="honeypot4cf7_options_form">
|
185 |
<?php wp_nonce_field('honeypot4cf7-submit', 'honeypot4cf7_nonce'); ?>
|
186 |
<a href="https://wordpress.org/support/plugin/contact-form-7-honeypot/" target="_blank" class="honeypot4cf7_admin__support-link">
|
187 |
<span class="dashicons dashicons-editor-help"></span>
|
188 |
+
<?php esc_html_e( __( 'Get Support', 'contact-form-7-honeypot' )); ?>
|
189 |
</a>
|
190 |
<h3><span class="dashicons dashicons-admin-generic"></span> <?php esc_html_e('Honeypot Settings'); ?></h3>
|
191 |
<table class="form-table">
|
192 |
<tbody>
|
193 |
<tr valign="top">
|
194 |
+
<th><label for="honeypot4cf7__store-honeypot"><?php esc_html_e( __( 'Store Honeypot Value', 'contact-form-7-honeypot' )); ?></label></th>
|
195 |
<td>
|
196 |
<input type="checkbox" name="honeypot4cf7_store" id="honeypot4cf7__store-honeypot" value="1" <?php checked($honeypot4cf7_config['store_honeypot'],1); ?>>
|
197 |
</td>
|
198 |
</tr>
|
199 |
<tr valign="top">
|
200 |
+
<td class="description" colspan="2"><?php printf(__( '(Recommended) By default the Honeypot field is not stored with other fields in form-saving plugins like %1$s. However, saving the field can be useful to see what spam bots are leaving behind to help you improve your spam stopping superpowers. If you\'d like to store the value of the field, simply check this box (and install %1$s).', 'contact-form-7-honeypot' ), '<a href="https://wordpress.org/plugins/flamingo/" target="_blank">Flamingo</a>'); ?></td>
|
201 |
</tr>
|
202 |
|
203 |
<tr valign="top">
|
204 |
+
<th><label for="honeypot4cf7__placeholder"><?php esc_html_e( __( 'Global Placeholder', 'contact-form-7-honeypot' )); ?></label></th>
|
205 |
<td>
|
206 |
<input type="text" class="regular-text" name="honeypot4cf7_placeholder" id="honeypot4cf7__placeholder" value="<?php echo sanitize_text_field($honeypot4cf7_config['placeholder']); ?>">
|
207 |
</td>
|
208 |
</tr>
|
209 |
<tr valign="top">
|
210 |
+
<td class="description" colspan="2"><?php esc_html_e( __( 'If using placeholders on other fields, this can help honeypot mimic a "real" field. This can be overridden in the contact form. If you\'re unsure, leave blank.', 'contact-form-7-honeypot' ) ); ?></td>
|
211 |
</tr>
|
212 |
|
213 |
<tr valign="top">
|
214 |
+
<th><label for="honeypot4cf7__accessibility_message"><?php esc_html_e( __( 'Accessibility Message', 'contact-form-7-honeypot' )); ?></label></th>
|
215 |
<td>
|
216 |
<input type="text" class="regular-text" name="honeypot4cf7_accessibility_message" id="honeypot4cf7__accessibility_message" value="<?php echo sanitize_text_field($honeypot4cf7_config['accessibility_message']); ?>">
|
217 |
</td>
|
218 |
</tr>
|
219 |
<tr valign="top">
|
220 |
+
<td class="description" colspan="2"><?php printf(__( 'You can customize the (hidden) accessibility message, or just leave it the default value: %1$s', 'contact-form-7-honeypot' ), '<em>'.__('Please leave this field empty.','contact-form-7-honeypot').'</em>'); ?></td>
|
221 |
</tr>
|
222 |
|
223 |
<tr valign="top">
|
224 |
+
<th><label for="honeypot4cf7__w3c-valid-autocomplete"><?php esc_html_e( __( 'Use Standard Autocomplete Value', 'contact-form-7-honeypot' )); ?></label></th>
|
225 |
<td>
|
226 |
<input type="checkbox" name="honeypot4cf7_w3c_valid_autocomplete[]" id="honeypot4cf7__w3c-valid-autocomplete" value="true" <?php checked($honeypot4cf7_config['w3c_valid_autocomplete'][0],'true'); ?>>
|
227 |
</td>
|
228 |
</tr>
|
229 |
<tr valign="top">
|
230 |
+
<td class="description" colspan="2"><?php esc_html_e(__( 'To assure the honeypot isn\'t auto-completed by a browser, we add an atypical "autocomplete" attribute value. If you have any problems with this, you can switch it to the more standard (but less effective) "off" value. If you\'re unsure, leave this unchecked.', 'contact-form-7-honeypot' )); ?></td>
|
231 |
</tr>
|
232 |
|
233 |
<tr valign="top">
|
234 |
+
<th><label for="honeypot4cf7__move_inline_css"><?php esc_html_e( __( 'Move Inline CSS', 'contact-form-7-honeypot' )); ?></label></th>
|
235 |
<td>
|
236 |
<input type="checkbox" name="honeypot4cf7_move_inline_css[]" id="honeypot4cf7__move_inline_css" value="true" <?php checked($honeypot4cf7_config['move_inline_css'][0],'true'); ?>>
|
237 |
</td>
|
238 |
</tr>
|
239 |
<tr valign="top">
|
240 |
+
<td class="description" colspan="2"><?php esc_html_e(__( 'By default Honeypot uses inline CSS on the honeypot field to hide it. Checking this box moves that CSS to the footer of the page. It may help confuse bots.', 'contact-form-7-honeypot' )); ?></td>
|
241 |
</tr>
|
242 |
|
243 |
<tr valign="top">
|
244 |
+
<th><label for="honeypot4cf7__nomessage"><?php esc_html_e( __( 'Disable Accessibility Label', 'contact-form-7-honeypot' )); ?></label></th>
|
245 |
<td>
|
246 |
<input type="checkbox" name="honeypot4cf7_nomessage[]" id="honeypot4cf7__nomessage" value="true" <?php checked($honeypot4cf7_config['nomessage'][0],'true'); ?>>
|
247 |
</td>
|
248 |
</tr>
|
249 |
<tr valign="top">
|
250 |
+
<td class="description" colspan="2"><?php esc_html_e(__( 'If checked, the accessibility label will not be generated. This is not recommended, but may improve spam blocking. If you\'re unsure, leave this unchecked.', 'contact-form-7-honeypot' )); ?></td>
|
251 |
</tr>
|
252 |
</tbody>
|
253 |
</table>
|
254 |
<p class="submit">
|
255 |
+
<input name="save" id="save" class="button button-primary" value="<?php esc_html_e( __( 'Save', 'contact-form-7-honeypot' )); ?>" type="submit" />
|
256 |
+
<input name="clear" id="reset" class="button" value="<?php esc_html_e( __( 'Reset to Defaults', 'contact-form-7-honeypot' )); ?>" type="submit" />
|
257 |
|
258 |
</p>
|
259 |
</form>
|
267 |
<div class="honeypot4cf7-admin__box honeypot4cf7-admin__box--count-message">
|
268 |
<p>
|
269 |
<span class="dashicons dashicons-chart-area"></span> <?php printf(
|
270 |
+
__('Honeypot has stopped %1$s spam submissions since %2$s', 'contact-form-7-honeypot'),
|
271 |
'<strong>'.$honeypot4cf7_config['honeypot_count'].'</strong>',
|
272 |
date(get_option('date_format'), $honeypot4cf7_config['honeypot_install_date'])
|
273 |
); ?>
|
278 |
<div class="honeypot4cf7-admin__secondary">
|
279 |
<div class="honeypot4cf7-admin__box honeypot4cf7-admin__box--coffee">
|
280 |
<p class="honeypot4cf7-admin__coffee-message">
|
281 |
+
<?php esc_html_e(__( 'Do you like Honeypot for CF7? Consider showing your support:', 'contact-form-7-honeypot' )); ?><br>
|
282 |
<a href="http://www.nocean.ca/buy-us-a-coffee/" target="_blank" class="button button-primary"><strong>
|
283 |
+
<span class="dashicons dashicons-coffee"></span> <?php esc_html_e(__('Buy Us a Coffee','contact-form-7-honeypot')); ?>
|
284 |
</strong></a>
|
285 |
</p>
|
286 |
</div>
|
287 |
<div class="honeypot4cf7-admin__box">
|
288 |
<p class="honeypot4cf7__banner-ad-message">
|
289 |
<?php printf(
|
290 |
+
__( 'We use %s and find it incredibly valuable. If you choose to use them too (even for free), you are helping continued development and support of this plugin. Thank you!', 'contact-form-7-honeypot' ),
|
291 |
'<a href="https://shareasale.com/r.cfm?b=1537039&u=2748065&m=97231&urllink=&afftrack=0" target="_blank">Semrush</a>'
|
292 |
); ?>
|
293 |
</p>
|
298 |
|
299 |
<div class="honeypot4cf7-admin__box honeypot4cf7-admin__rate-us">
|
300 |
<div class="honeypot4cf7-admin__stars"><a target="_blank" href="https://wordpress.org/support/plugin/contact-form-7-honeypot/reviews/?filter=5#new-post"><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span></a></div>
|
301 |
+
<?php printf(__('Please rate us on %1$s. Thanks!!','contact-form-7-honeypot'),'<a target="_blank" href="https://wordpress.org/support/plugin/contact-form-7-honeypot/reviews/?filter=5#new-post">wordpress.org</a>'); ?>
|
302 |
</div>
|
303 |
</div>
|
304 |
</div>
|
includes/honeypot4cf7.php
CHANGED
@@ -51,7 +51,7 @@ function honeypot4cf7_form_tag_handler( $tag ) {
|
|
51 |
|
52 |
$placeholder = (string) reset( $tag->values );
|
53 |
|
54 |
-
$accessibility_message = ($honeypot4cf7_config['accessibility_message']) ? $honeypot4cf7_config['accessibility_message'] : __('Please leave this field empty.',
|
55 |
|
56 |
$atts = array(
|
57 |
'class' => $tag->get_class_option( $class ),
|
@@ -130,7 +130,7 @@ function honeypot4cf7_spam_check($spam, $submission) {
|
|
130 |
$spam = true;
|
131 |
$submission->add_spam_log( array(
|
132 |
'agent' => 'honeypot',
|
133 |
-
'reason' => __( 'Something is stuck in the honey. Field ID = '. $hpid,
|
134 |
) );
|
135 |
|
136 |
$honeypot4cf7_config = get_option('honeypot4cf7_config');
|
@@ -156,13 +156,13 @@ add_action( 'wpcf7_admin_init', 'honeypot4cf7_generate_form_tag', 10, 0 );
|
|
156 |
|
157 |
function honeypot4cf7_generate_form_tag() {
|
158 |
$tag_generator = WPCF7_TagGenerator::get_instance();
|
159 |
-
$tag_generator->add( 'honeypot', __( 'Honeypot',
|
160 |
}
|
161 |
|
162 |
function honeypot4cf7_form_tag_generator($contact_form, $args = '') {
|
163 |
$args = wp_parse_args( $args, array() );
|
164 |
-
$description = __( "Generate a form-tag for a spam-stopping honeypot field. For more details, see %s.",
|
165 |
-
$desc_link = '<a href="https://wordpress.org/plugins/contact-form-7-honeypot/" target="_blank">'.__( 'Honeypot for CF7',
|
166 |
?>
|
167 |
<div class="control-box">
|
168 |
<fieldset>
|
@@ -171,17 +171,17 @@ function honeypot4cf7_form_tag_generator($contact_form, $args = '') {
|
|
171 |
<table class="form-table"><tbody>
|
172 |
<tr>
|
173 |
<th scope="row">
|
174 |
-
<label for="<?php echo esc_attr( $args['content'] . '-name' ); ?>"><?php echo esc_html( __( 'Name',
|
175 |
</th>
|
176 |
<td>
|
177 |
<input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr( $args['content'] . '-name' ); ?>" /><br>
|
178 |
-
<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".',
|
179 |
</td>
|
180 |
</tr>
|
181 |
|
182 |
<tr>
|
183 |
<th scope="row">
|
184 |
-
<label for="<?php echo esc_attr( $args['content'] . '-id' ); ?>"><?php echo esc_html( __( 'ID (optional)',
|
185 |
</th>
|
186 |
<td>
|
187 |
<input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-id' ); ?>" />
|
@@ -190,7 +190,7 @@ function honeypot4cf7_form_tag_generator($contact_form, $args = '') {
|
|
190 |
|
191 |
<tr>
|
192 |
<th scope="row">
|
193 |
-
<label for="<?php echo esc_attr( $args['content'] . '-class' ); ?>"><?php echo esc_html( __( 'Class (optional)',
|
194 |
</th>
|
195 |
<td>
|
196 |
<input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-class' ); ?>" />
|
@@ -199,51 +199,51 @@ function honeypot4cf7_form_tag_generator($contact_form, $args = '') {
|
|
199 |
|
200 |
<tr>
|
201 |
<th scope="row">
|
202 |
-
<label for="<?php echo esc_attr( $args['content'] . '-wrapper-id' ); ?>"><?php echo esc_html( __( 'Wrapper ID (optional)',
|
203 |
</th>
|
204 |
<td>
|
205 |
<input type="text" name="wrapper-id" class="wrapper-id-value oneline option" id="<?php echo esc_attr( $args['content'] . '-wrapper-id' ); ?>" /><br>
|
206 |
-
<em><?php echo esc_html( __( 'By default the markup that wraps this form item has a random ID. You can customize it here. If you\'re unsure, leave blank.',
|
207 |
</td>
|
208 |
</tr>
|
209 |
|
210 |
<tr>
|
211 |
<th scope="row">
|
212 |
-
<label for="<?php echo esc_attr( $args['content'] . '-values' ); ?>"><?php echo esc_html( __( 'Placeholder (optional)',
|
213 |
</th>
|
214 |
<td>
|
215 |
<input type="text" name="values" class="oneline" id="<?php echo esc_attr( $args['content'] . '-values' ); ?>" /><br>
|
216 |
-
<em><?php echo esc_html( __( 'If using placeholders on other fields, this can help honeypot mimic a "real" field. If you\'re unsure, leave blank.',
|
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 Standard Autocomplete Value (optional)',
|
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 __('To assure the honeypot isn\'t auto-completed by a browser, we add an atypical "autocomplete" attribute value. If you have any problems with this, you can switch it to the more standard (but less effective) "off" value. If you\'re unsure, leave this unchecked.',
|
227 |
</td>
|
228 |
</tr>
|
229 |
|
230 |
<tr>
|
231 |
<th scope="row">
|
232 |
-
<label for="<?php echo esc_attr( $args['content'] . '-move-inline-css' ); ?>"><?php echo esc_html( __( 'Move inline CSS (optional)',
|
233 |
</th>
|
234 |
<td>
|
235 |
<input type="checkbox" name="move-inline-css:true" id="<?php echo esc_attr( $args['content'] . '-move-inline-css' ); ?>" class="move-inline-css-value option" /><br />
|
236 |
-
<em><?php echo __('Moves the CSS to hide the honeypot from the element to the footer of the page. May help confuse bots.',
|
237 |
</td>
|
238 |
</tr>
|
239 |
|
240 |
<tr>
|
241 |
<th scope="row">
|
242 |
-
<label for="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>"><?php echo esc_html( __( 'Disable Accessibility Label (optional)',
|
243 |
</th>
|
244 |
<td>
|
245 |
<input type="checkbox" name="nomessage:true" id="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>" class="messagekillvalue option" /><br />
|
246 |
-
<em><?php echo __('If checked, the accessibility label will not be generated. This is not recommended, but may improve spam blocking. If you\'re unsure, leave this unchecked.',
|
247 |
</td>
|
248 |
</tr>
|
249 |
|
@@ -255,7 +255,7 @@ function honeypot4cf7_form_tag_generator($contact_form, $args = '') {
|
|
255 |
<input type="text" name="honeypot" class="tag code" readonly="readonly" onfocus="this.select()" />
|
256 |
|
257 |
<div class="submitbox">
|
258 |
-
<input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr( __( 'Insert Tag',
|
259 |
</div>
|
260 |
|
261 |
<br class="clear" />
|
51 |
|
52 |
$placeholder = (string) reset( $tag->values );
|
53 |
|
54 |
+
$accessibility_message = ($honeypot4cf7_config['accessibility_message']) ? $honeypot4cf7_config['accessibility_message'] : __('Please leave this field empty.','contact-form-7-honeypot');
|
55 |
|
56 |
$atts = array(
|
57 |
'class' => $tag->get_class_option( $class ),
|
130 |
$spam = true;
|
131 |
$submission->add_spam_log( array(
|
132 |
'agent' => 'honeypot',
|
133 |
+
'reason' => __( 'Something is stuck in the honey. Field ID = '. $hpid, 'contact-form-7-honeypot' ),
|
134 |
) );
|
135 |
|
136 |
$honeypot4cf7_config = get_option('honeypot4cf7_config');
|
156 |
|
157 |
function honeypot4cf7_generate_form_tag() {
|
158 |
$tag_generator = WPCF7_TagGenerator::get_instance();
|
159 |
+
$tag_generator->add( 'honeypot', __( 'Honeypot', 'contact-form-7-honeypot' ), 'honeypot4cf7_form_tag_generator' );
|
160 |
}
|
161 |
|
162 |
function honeypot4cf7_form_tag_generator($contact_form, $args = '') {
|
163 |
$args = wp_parse_args( $args, array() );
|
164 |
+
$description = __( "Generate a form-tag for a spam-stopping honeypot field. For more details, see %s.", 'contact-form-7-honeypot' );
|
165 |
+
$desc_link = '<a href="https://wordpress.org/plugins/contact-form-7-honeypot/" target="_blank">'.__( 'Honeypot for CF7', 'contact-form-7-honeypot' ).'</a>';
|
166 |
?>
|
167 |
<div class="control-box">
|
168 |
<fieldset>
|
171 |
<table class="form-table"><tbody>
|
172 |
<tr>
|
173 |
<th scope="row">
|
174 |
+
<label for="<?php echo esc_attr( $args['content'] . '-name' ); ?>"><?php echo esc_html( __( 'Name', 'contact-form-7-honeypot' ) ); ?></label>
|
175 |
</th>
|
176 |
<td>
|
177 |
<input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr( $args['content'] . '-name' ); ?>" /><br>
|
178 |
+
<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>
|
179 |
</td>
|
180 |
</tr>
|
181 |
|
182 |
<tr>
|
183 |
<th scope="row">
|
184 |
+
<label for="<?php echo esc_attr( $args['content'] . '-id' ); ?>"><?php echo esc_html( __( 'ID (optional)', 'contact-form-7-honeypot' ) ); ?></label>
|
185 |
</th>
|
186 |
<td>
|
187 |
<input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-id' ); ?>" />
|
190 |
|
191 |
<tr>
|
192 |
<th scope="row">
|
193 |
+
<label for="<?php echo esc_attr( $args['content'] . '-class' ); ?>"><?php echo esc_html( __( 'Class (optional)', 'contact-form-7-honeypot' ) ); ?></label>
|
194 |
</th>
|
195 |
<td>
|
196 |
<input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr( $args['content'] . '-class' ); ?>" />
|
199 |
|
200 |
<tr>
|
201 |
<th scope="row">
|
202 |
+
<label for="<?php echo esc_attr( $args['content'] . '-wrapper-id' ); ?>"><?php echo esc_html( __( 'Wrapper ID (optional)', 'contact-form-7-honeypot' ) ); ?></label>
|
203 |
</th>
|
204 |
<td>
|
205 |
<input type="text" name="wrapper-id" class="wrapper-id-value oneline option" id="<?php echo esc_attr( $args['content'] . '-wrapper-id' ); ?>" /><br>
|
206 |
+
<em><?php echo esc_html( __( 'By default the markup that wraps this form item has a random ID. You can customize it here. If you\'re unsure, leave blank.', 'contact-form-7-honeypot' ) ); ?></em>
|
207 |
</td>
|
208 |
</tr>
|
209 |
|
210 |
<tr>
|
211 |
<th scope="row">
|
212 |
+
<label for="<?php echo esc_attr( $args['content'] . '-values' ); ?>"><?php echo esc_html( __( 'Placeholder (optional)', 'contact-form-7-honeypot' ) ); ?></label>
|
213 |
</th>
|
214 |
<td>
|
215 |
<input type="text" name="values" class="oneline" id="<?php echo esc_attr( $args['content'] . '-values' ); ?>" /><br>
|
216 |
+
<em><?php echo esc_html( __( 'If using placeholders on other fields, this can help honeypot mimic a "real" field. If you\'re unsure, leave blank.', 'contact-form-7-honeypot' ) ); ?></em>
|
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 Standard Autocomplete Value (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 __('To assure the honeypot isn\'t auto-completed by a browser, we add an atypical "autocomplete" attribute value. If you have any problems with this, you can switch it to the more standard (but less effective) "off" value. 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'] . '-move-inline-css' ); ?>"><?php echo esc_html( __( 'Move inline CSS (optional)', 'contact-form-7-honeypot' ) ); ?></label>
|
233 |
</th>
|
234 |
<td>
|
235 |
<input type="checkbox" name="move-inline-css:true" id="<?php echo esc_attr( $args['content'] . '-move-inline-css' ); ?>" class="move-inline-css-value option" /><br />
|
236 |
+
<em><?php echo __('Moves the CSS to hide the honeypot from the element to the footer of the page. May help confuse bots.','contact-form-7-honeypot'); ?></em>
|
237 |
</td>
|
238 |
</tr>
|
239 |
|
240 |
<tr>
|
241 |
<th scope="row">
|
242 |
+
<label for="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>"><?php echo esc_html( __( 'Disable Accessibility Label (optional)', 'contact-form-7-honeypot' ) ); ?></label>
|
243 |
</th>
|
244 |
<td>
|
245 |
<input type="checkbox" name="nomessage:true" id="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>" class="messagekillvalue option" /><br />
|
246 |
+
<em><?php echo __('If checked, the accessibility label will not be generated. This is not recommended, but may improve spam blocking. If you\'re unsure, leave this unchecked.','contact-form-7-honeypot'); ?></em>
|
247 |
</td>
|
248 |
</tr>
|
249 |
|
255 |
<input type="text" name="honeypot" class="tag code" readonly="readonly" onfocus="this.select()" />
|
256 |
|
257 |
<div class="submitbox">
|
258 |
+
<input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr( __( 'Insert Tag', 'contact-form-7-honeypot' ) ); ?>" />
|
259 |
</div>
|
260 |
|
261 |
<br class="clear" />
|
readme.txt
CHANGED
@@ -3,6 +3,7 @@ Tags: honeypot, antispam, anti-spam, captcha, spam, bots, form, forms, contact f
|
|
3 |
Requires at least: 4.8
|
4 |
Tested up to: 5.7
|
5 |
Stable tag: trunk
|
|
|
6 |
Contributors: nocean, DaoByDesign
|
7 |
Donate link: http://www.nocean.ca/buy-us-a-coffee/
|
8 |
License: GPLv2 or later
|
@@ -75,7 +76,15 @@ You bet! If the honeypot trap is triggered, an email isn't sent, but the form su
|
|
75 |
= Why do you have affiliate ads on your settings page? =
|
76 |
I realize not everyone loves ads, but daddy's gotta pay the bills. I'm extremely grateful to the numerous users that have donated to the plugin's development over the years, and while that's awesome, I don't think donations will ever come remotely close to covering the time and effort it takes to maintain and support a plugin that now has **nearly 1.5 million downloads** and **more than 300,000 active installs**.
|
77 |
|
|
|
|
|
|
|
|
|
|
|
78 |
== Changelog ==
|
|
|
|
|
|
|
79 |
= 2.0.1 =
|
80 |
Hotfix for issue with options not being set on upgrade.
|
81 |
|
3 |
Requires at least: 4.8
|
4 |
Tested up to: 5.7
|
5 |
Stable tag: trunk
|
6 |
+
Requires PHP: 5.6
|
7 |
Contributors: nocean, DaoByDesign
|
8 |
Donate link: http://www.nocean.ca/buy-us-a-coffee/
|
9 |
License: GPLv2 or later
|
76 |
= Why do you have affiliate ads on your settings page? =
|
77 |
I realize not everyone loves ads, but daddy's gotta pay the bills. I'm extremely grateful to the numerous users that have donated to the plugin's development over the years, and while that's awesome, I don't think donations will ever come remotely close to covering the time and effort it takes to maintain and support a plugin that now has **nearly 1.5 million downloads** and **more than 300,000 active installs**.
|
78 |
|
79 |
+
== Screenshots ==
|
80 |
+
|
81 |
+
1. Global Honeypot Settings
|
82 |
+
2. Honeypot CF7 Form Tag Settings
|
83 |
+
|
84 |
== Changelog ==
|
85 |
+
= 2.0.2 =
|
86 |
+
Replaced text domain constant with plain string for better i18n compatability in some plugins.
|
87 |
+
|
88 |
= 2.0.1 =
|
89 |
Hotfix for issue with options not being set on upgrade.
|
90 |
|