Contact Form 7 Image Captcha - Version 3.2.6

Version Description

[09/01/2022] = * Fixed issue where validation errors were not showing due to the Contact Form 7 version 5.6 update * Removed localized language files in favor of using translate.wordpress.org

Download this release

Release Info

Developer KTC_88
Plugin Icon 128x128 Contact Form 7 Image Captcha
Version 3.2.6
Comparing to
See all releases

Version 3.2.6

Files changed (3) hide show
  1. cf7-image-captcha.php +189 -0
  2. readme.txt +230 -0
  3. style.css +11 -0
cf7-image-captcha.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Name: Contact Form 7 Image Captcha
4
+ * Plugin URI: https://wordpress.org/plugins/contact-form-7-image-captcha/
5
+ * Description: Add a simple image captcha and Honeypot to contact form 7
6
+ * Version: 3.2.6
7
+ * Author: KC Computing
8
+ * Author URI: https://profiles.wordpress.org/ktc_88
9
+ * License: GNU General Public License v2
10
+ * License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
+ * Text Domain: contact-form-7-image-captcha
12
+ */
13
+
14
+
15
+
16
+
17
+ /**
18
+ * Add "Go Pro" action link to plugins table
19
+ */
20
+ add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'cf7ic_plugin_action_links' );
21
+ function cf7ic_plugin_action_links( $links ) {
22
+ return array_merge(
23
+ array(
24
+ 'go-pro' => '<a href="https://kccomputing.net/downloads/contact-form-7-image-captcha-pro/">' . __( 'Go Pro', 'contact-form-7-image-captcha' ) . '</a>'
25
+ ),
26
+ $links
27
+ );
28
+ }
29
+
30
+
31
+ /**
32
+ * Register/Enqueue CSS on initialization
33
+ */
34
+ add_action('init', 'cf7ic_register_style');
35
+ function cf7ic_register_style() {
36
+ wp_register_style( 'cf7ic_style', plugins_url('/style.css', __FILE__), false, '3.2.5', 'all');
37
+ }
38
+
39
+
40
+ /**
41
+ * Add custom shortcode to Contact Form 7
42
+ */
43
+ add_action( 'wpcf7_init', 'add_shortcode_cf7ic' );
44
+ function add_shortcode_cf7ic() {
45
+ wpcf7_add_form_tag( 'cf7ic', 'call_cf7ic', true );
46
+ }
47
+
48
+
49
+ /**
50
+ * cf7ic shortcode
51
+ */
52
+ function call_cf7ic( $tag ) {
53
+ $tag = new WPCF7_FormTag( $tag );
54
+ $toggle = '';
55
+ if($tag['raw_values']) {
56
+ $toggle = $tag['raw_values'][0];
57
+ }
58
+
59
+ wp_enqueue_style( 'cf7ic_style' ); // enqueue css
60
+
61
+ // Create an array to hold the image library
62
+ $captchas = array(
63
+ __( 'Heart', 'contact-form-7-image-captcha') => '<svg width="50" height="50" aria-hidden="true" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M415 24c-53 0-103 42-127 65-24-23-74-65-127-65C70 24 16 77 16 166c0 72 67 133 69 135l187 181c9 8 23 8 32 0l187-180c2-3 69-64 69-136 0-89-54-142-145-142z"/></svg>',
64
+ __( 'House', 'contact-form-7-image-captcha') => '<svg width="50" height="50" aria-hidden="true" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M488 313v143c0 13-11 24-24 24H348c-7 0-12-5-12-12V356c0-7-5-12-12-12h-72c-7 0-12 5-12 12v112c0 7-5 12-12 12H112c-13 0-24-11-24-24V313c0-4 2-7 4-10l188-154c5-4 11-4 16 0l188 154c2 3 4 6 4 10zm84-61l-84-69V44c0-6-5-12-12-12h-56c-7 0-12 6-12 12v73l-89-74a48 48 0 00-61 0L4 252c-5 4-5 12-1 17l25 31c5 5 12 5 17 1l235-193c5-4 11-4 16 0l235 193c5 5 13 4 17-1l25-31c4-6 4-13-1-17z"/></svg>',
65
+ __( 'Star', 'contact-form-7-image-captcha') => '<svg width="50" height="50" aria-hidden="true" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M259 18l-65 132-146 22c-26 3-37 36-18 54l106 103-25 146c-5 26 23 46 46 33l131-68 131 68c23 13 51-7 46-33l-25-146 106-103c19-18 8-51-18-54l-146-22-65-132a32 32 0 00-58 0z"/></svg>',
66
+ __( 'Car', 'contact-form-7-image-captcha') => '<svg width="50" height="50" aria-hidden="true" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M500 168h-55l-8-21a127 127 0 00-120-83H195a127 127 0 00-120 83l-8 21H12c-8 0-14 8-11 16l8 24a12 12 0 0011 8h29a64 64 0 00-33 56v48c0 16 6 31 16 42v62c0 13 11 24 24 24h48c13 0 24-11 24-24v-40h256v40c0 13 11 24 24 24h48c13 0 24-11 24-24v-62c10-11 16-26 16-42v-48c0-24-13-45-33-56h29a12 12 0 0011-8l8-24c3-8-3-16-11-16zm-365 2c9-25 33-42 60-42h122c27 0 51 17 60 42l15 38H120l15-38zM88 328a32 32 0 010-64c18 0 48 30 48 48s-30 16-48 16zm336 0c-18 0-48 2-48-16s30-48 48-48 32 14 32 32-14 32-32 32z"/></svg>',
67
+ __( 'Cup', 'contact-form-7-image-captcha') => '<svg width="50" height="50" aria-hidden="true" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M192 384h192c53 0 96-43 96-96h32a128 128 0 000-256H120c-13 0-24 11-24 24v232c0 53 43 96 96 96zM512 96a64 64 0 010 128h-32V96h32zm48 384H48c-47 0-61-64-36-64h584c25 0 11 64-36 64z"/></svg>',
68
+ __( 'Flag', 'contact-form-7-image-captcha') => '<svg width="50" height="50" aria-hidden="true" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M350 99c-54 0-98-35-166-35-25 0-47 4-68 12a56 56 0 004-24C118 24 95 1 66 0a56 56 0 00-34 102v386c0 13 11 24 24 24h16c13 0 24-11 24-24v-94c28-12 64-23 114-23 54 0 98 35 166 35 48 0 86-16 122-41 9-6 14-15 14-26V96c0-23-24-39-45-29-35 16-77 32-117 32z"/></svg>',
69
+ __( 'Key', 'contact-form-7-image-captcha') => '<svg width="50" height="50" aria-hidden="true" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M512 176a176 176 0 01-209 173l-24 27a24 24 0 01-18 8h-37v40c0 13-11 24-24 24h-40v40c0 13-11 24-24 24H24c-13 0-24-11-24-24v-78c0-6 3-13 7-17l162-162a176 176 0 11343-55zm-176-48a48 48 0 1096 0 48 48 0 00-96 0z"/></svg>',
70
+ __( 'Truck', 'contact-form-7-image-captcha') => '<svg width="50" height="50" aria-hidden="true" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M624 352h-16V244c0-13-5-25-14-34L494 110c-9-9-21-14-34-14h-44V48c0-26-21-48-48-48H48C22 0 0 22 0 48v320c0 27 22 48 48 48h16a96 96 0 00192 0h128a96 96 0 00192 0h48c9 0 16-7 16-16v-32c0-9-7-16-16-16zM160 464a48 48 0 110-96 48 48 0 010 96zm320 0a48 48 0 110-96 48 48 0 010 96zm80-208H416V144h44l100 100v12z"/></svg>',
71
+ __( 'Tree', 'contact-form-7-image-captcha') => '<svg width="50" height="50" aria-hidden="true" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M377 375l-83-87h34c21 0 32-25 17-40l-82-88h33c21 0 32-25 18-40L210 8c-10-11-26-11-36 0L70 120c-14 15-3 40 18 40h33l-82 88c-15 15-4 40 17 40h34L7 375c-15 16-4 41 17 41h120c0 33-11 49-34 68-12 9-5 28 10 28h144c15 0 22-19 10-28-20-16-34-32-34-68h120c21 0 32-25 17-41z"/></svg>',
72
+ __( 'Plane', 'contact-form-7-image-captcha') => '<svg width="50" height="50" aria-hidden="true" role="img" xmlns="https://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="currentColor" d="M472 200H360L256 6a12 12 0 00-10-6h-58c-8 0-14 7-12 15l34 185H100l-35-58a12 12 0 00-10-6H12c-8 0-13 7-12 14l21 106L0 362c-1 7 4 14 12 14h43c4 0 8-2 10-6l35-58h110l-34 185c-2 8 4 15 12 15h58a12 12 0 0010-6l104-194h112c57 0 104-25 104-56s-47-56-104-56z"/></svg>',
73
+ );
74
+
75
+ $choice = array_rand( $captchas, 3);
76
+ foreach($choice as $key) {
77
+ $choices[$key] = $captchas[$key];
78
+ }
79
+
80
+ // Pick a number between 0-2 and use it to determine which array item will be used as the answer
81
+ $human = rand(0,2);
82
+
83
+ if($toggle == 'toggle') {
84
+ $style = 'style="display: none;"';
85
+ add_action('wp_footer', 'cf7ic_toggle');
86
+ } else {
87
+ $style = '';
88
+ }
89
+
90
+ $output = '
91
+ <span class="captcha-image" '.$style.'>
92
+ <span class="cf7ic_instructions">';
93
+ $output .= __('Please prove you are human by selecting the ', 'contact-form-7-image-captcha');
94
+ $output .= '<span> '.$choice[$human].'</span>';
95
+ $output .= __('.', 'contact-form-7-image-captcha').'</span>';
96
+ $i = -1;
97
+ foreach($choices as $title => $image) {
98
+ $i++;
99
+ if($i == $human) { $value = "kc_human"; } else { $value = "bot"; };
100
+ $output .= '<label><input type="radio" name="kc_captcha" value="'. $value .'" />'. $image .'</label>';
101
+ }
102
+ $output .= '
103
+ </span>
104
+ <span style="display:none">
105
+ <input type="text" name="kc_honeypot">
106
+ </span>';
107
+
108
+ return '<span class="wpcf7-form-control-wrap kc_captcha" data-name="kc_captcha"><span class="wpcf7-form-control wpcf7-radio">'.$output.'</span></span>';
109
+ }
110
+
111
+
112
+ /**
113
+ * Custom validator
114
+ */
115
+ function cf7ic_check_if_spam( $result, $tag ) {
116
+
117
+ // Because the validator is triggered on every submission, look through tags to see if cf7ic is being used
118
+ $key = array_search('cf7ic', array_column($tag, 'type'));
119
+
120
+ if(!empty($key) ) { // If cf7ic is being used on the form, run validation
121
+ $tag = new WPCF7_FormTag( $tag );
122
+ $tag->name = "kc_captcha";
123
+
124
+ $kc_val1 = isset( $_POST['kc_captcha'] ) ? trim( $_POST['kc_captcha'] ) : ''; // Get selected icon value
125
+ $kc_val2 = isset( $_POST['kc_honeypot'] ) ? trim( $_POST['kc_honeypot'] ) : ''; // Get honeypot value
126
+
127
+ if(!empty($kc_val1) && $kc_val1 != 'kc_human' ) {
128
+ $tag->name = "kc_captcha";
129
+ $error = __('Please select the correct icon.', 'contact-form-7-image-captcha');
130
+ $result->invalidate( $tag, $error );
131
+ }
132
+ if(empty($kc_val1) ) {
133
+ $tag->name = "kc_captcha";
134
+ $error = __('Please select an icon.', 'contact-form-7-image-captcha');
135
+ $result->invalidate( $tag, $error );
136
+ }
137
+ if(!empty($kc_val2) ) {
138
+ $tag->name = "kc_captcha";
139
+ $result->invalidate( $tag, wpcf7_get_message( 'spam' ) );
140
+ }
141
+ }
142
+ return $result;
143
+ }
144
+ add_filter('wpcf7_validate','cf7ic_check_if_spam', 99, 2); // If "Contact Form 7 – Conditional Fields" plugin is installed and active
145
+
146
+
147
+
148
+ // Add Contact Form Tag Generator Button
149
+ add_action( 'wpcf7_admin_init', 'cf7ic_add_tag_generator', 55 );
150
+
151
+ function cf7ic_add_tag_generator() {
152
+ $tag_generator = WPCF7_TagGenerator::get_instance();
153
+ $tag_generator->add( 'cf7ic', __( 'Image Captcha', 'contact-form-7-image-captcha' ),
154
+ 'cf7ic_tag_generator', array( 'nameless' => 1 ) );
155
+ }
156
+
157
+ function cf7ic_tag_generator( $contact_form, $args = '' ) {
158
+ $args = wp_parse_args( $args, array() ); ?>
159
+ <div class="control-box">
160
+ <fieldset>
161
+ <legend>Coming soon to <a href="https://kccomputing.net/downloads/contact-form-7-image-captcha-pro/" target="_blank">Contact Form 7 Image Captcha Pro</a>, edit the styling directly from this box.</legend>
162
+ </fieldset>
163
+ </div>
164
+ <div class="insert-box">
165
+ <input type="text" name="cf7ic" class="tag code" readonly="readonly" onfocus="this.select()" />
166
+ <div class="submitbox">
167
+ <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr( __( 'Insert Tag', 'contact-form-7' ) ); ?>" />
168
+ </div>
169
+ </div>
170
+ <?php
171
+ }
172
+
173
+
174
+ function cf7ic_toggle(){
175
+ echo '<script type="text/javascript">
176
+ jQuery(document).ready(function(){
177
+ jQuery("body").on("focus", "form.wpcf7-form", function(){
178
+ jQuery(this).find(".captcha-image").show();
179
+ });
180
+ })
181
+
182
+ document.addEventListener( "wpcf7submit", function( event ) {
183
+ if(jQuery(".wpcf7-mail-sent-ok").length) {
184
+ jQuery(this).find(".captcha-image").hide();
185
+ jQuery(":focus").blur()
186
+ }
187
+ }, false );
188
+ </script>';
189
+ };
readme.txt ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Contact Form 7 Image Captcha ===
2
+ Contributors: KTC_88
3
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6ZBN6VSE6UM4A
4
+ Tags: contact form 7, spam, captcha
5
+ Requires at least: 4.7
6
+ Requires PHP: 7.0
7
+ Tested up to: 5.9.1
8
+ Stable tag: trunk
9
+ License: GPLv2 or later
10
+ License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
+
12
+ Adds a clean image captcha to Contact Form 7
13
+
14
+ == Description ==
15
+
16
+ Add an SVG image captcha and honeypot to your contact form 7 form. This CAPTCHA is GDPR compliant and becuase the images are inline SVG's, this plugin will not slow down your site with additional header requests like Google's ReCAPTCHA and respects your users privacy.
17
+
18
+ = Directions [PLEASE READ] =
19
+ Add the shortcode [cf7ic] to the form editor where you want the captcha to appear.
20
+
21
+ You can hide the CAPTCHA until a user interacts with the form, by adding "toggle" to the shortcode.
22
+ `[cf7ic "toggle"]`
23
+
24
+ **Like the plugin?**
25
+ **Please consider leaving a review.**
26
+
27
+ As of version 3.2.0, **Contact Form 7 Conditional Fields** is now fully supported! You no longer need to add `[hidden kc_captcha "kc_human"]` to forms that do not include the [cf7ic] shortcode.
28
+
29
+ == Go Pro! ==
30
+ Get even better spam protection with the All-in-one Image CAPTCHA Pro version of this plugin which includes additional options to improve spam protection, options to control the look and style of the CAPTCHA, additional forms support including login screens, gravity forms, WooCommerce, WPForms and more.
31
+
32
+ **PRO Demo**
33
+ See the Pro version in action on my <a href="https://kccomputing.net/contact-me/" target="_blank">Contact page</a>. You can also check out my <a href="https://www.youtube.com/channel/UCZznQBUawR-YqPBW8JjXzcw" target="_blank">YouTube channel</a> for instructional videos and demos.
34
+
35
+
36
+ Check out our <a href="https://kccomputing.net/downloads/contact-form-7-image-captcha-pro/" target="_blank">pro version</a> for more details.
37
+
38
+ **PRO Features:**
39
+
40
+ * GDPR compliant
41
+ * ADA/a11y/WCAG compliant
42
+ * Gravity Forms support
43
+ * WPForms support
44
+ * WooCommerce support for login, registration and checkout forms (optional)
45
+ * WordPress login/registration form support (optional)
46
+ * Default WordPress comment support
47
+ * Customize the look of the WordPress login/registration screen and form
48
+ * CAPTCHA refreshes on submit to make it harder for automated spammers
49
+ * Reverse honeypot which checks if you are human through form engagement
50
+ * Stronger security with hashed answers to make it harder for automated spammers to read the answers
51
+ * Add additional icons to increase the chances of a random guess getting through. You can increase it from a 1 and 3 chance all the way up to a 1 in 10 chance!
52
+ * Select which icons you wish to use
53
+ * Add additional icons from Font Awesome 4.7
54
+ * Add your own custom SVG icons
55
+ * Customize the icon titles
56
+ * Change the captcha message
57
+ * Change the captcha errors
58
+ * Change the box color and border
59
+ * Change font and icon color and size independently
60
+ * Change the selected icon appearance
61
+ * Change where the icons appear
62
+ * Change the box from full width to content width
63
+ * jQuery free on the front end
64
+
65
+ <a href="http://kccomputing.net/downloads/contact-form-7-image-captcha-pro/" target="_blank">Go Pro!</a>
66
+
67
+ == Installation ==
68
+
69
+ 1. Upload contents to the `/wp-content/plugins/` directory
70
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
71
+ 3. Place `[cf7ic]` to your contact form 7 forms
72
+
73
+ == Frequently Asked Questions ==
74
+
75
+ = How do you add the image CAPTCHA to the forms? =
76
+
77
+ Simply add this shortcode `[cf7ic]` to your contact form
78
+
79
+ = How do you use the toggle feature? =
80
+
81
+ To make it so the CAPTCHA only shows when the form is being filled out, add "toggle" to the shortcode `[cf7ic "toggle"]` in your contact form.
82
+
83
+ = Toggle is not working =
84
+
85
+ The most likely reason the toggle is not working is because the double quotes around the word toggle has been changed to "smart quotes", meaning that they are opening and closing quotation marks and not the verticle lines.
86
+
87
+ To fix, simply delete the quotes and re-add them with your keyboard - do not copy and paste.
88
+
89
+ = Why does the image CAPTCHA not appear? =
90
+
91
+ If the Image CAPTCHA does not appear, please confirm that you are running PHP version 7 or higher.
92
+
93
+ = Why does the styling of the image CAPTCHA look wrong? =
94
+
95
+ If the styling does not look right, you may need to clear your browser cache. If you have any caching plugins or speed optimization plugins installed, you may need to clear your site cache as well.
96
+
97
+ == Screenshots ==
98
+
99
+ 1. screenshot-1.png
100
+ 2. screenshot-2.png
101
+ 3. Pro version settings page
102
+
103
+ == Changelog ==
104
+ = 3.2.6 [09/01/2022] =
105
+ * Fixed issue where validation errors were not showing due to the Contact Form 7 version 5.6 update
106
+ * Removed localized language files in favor of using translate.wordpress.org
107
+
108
+ = 3.2.5 [03/08/2022] =
109
+ * Fixed iPhone bug where icon would not show focus state when touched
110
+ * Removed some unused styling to help reduce the stylesheet file size
111
+
112
+ = 3.2.4 [09/20/2021] =
113
+ * Minor update to styling to force icons to align horizontally, to fix an issue where the styling of some themes was causing the icons to stack vertically.
114
+
115
+ = 3.2.3 [06/08/2021] =
116
+ * Changed all http links to https
117
+ * Compressed SVG's to help improve load time
118
+
119
+ = 3.2.2 [04/15/2021] =
120
+ * Fixed double tap and partial border iPhone bug
121
+
122
+ = 3.2.1 [08/11/2020] =
123
+ * Added Croatian translation
124
+
125
+ = 3.2.0 [08/11/2020] =
126
+ * NEW: Full compatability for “Contact Form 7 Conditional Fields” by Jules Colle. Conditional Fields had been an ongoing issue for this plugin for a while now due to how the Conditional Fields plugin performed form validations, however I was finally able to come up with a solution that will allow this plugin to function normally with Conditional Fields installed. You no longer need to include [hidden kc_captcha "kc_human"] to your forms if the [cf7ic] shortcode is not included.
127
+
128
+ = 3.1.4 =
129
+ * Updated German (de) translation
130
+
131
+ = 3.1.3 =
132
+ * Updated Spanish (es) MO file
133
+
134
+ = 3.1.2 =
135
+ * Updated toggle so only the CAPTCHA on the form focused on will show. Previously if multiple forms with toggle were on a page, all of the CAPTCHA's would show.
136
+ * Updated toggle to hide CAPTCHA again once form has been successfully submitted.
137
+ * Added Dutch translation
138
+ * Added Portuguese (Portugal) translation
139
+
140
+ = 3.1.1 =
141
+ * Added additional css to prevent themes from changing the layout of the icons in the CAPTCHA
142
+
143
+ = 3.1.0 =
144
+ * Fixed issue where you needed to add `[hidden kc_captcha "kc_human"]` to forms you Did NOT want the CAPTCHA to be on. You now ONLY need to add the hidden field to your forms with no CAPTCHA, IF you have Contact Form 7 Conditional Fields installed.
145
+
146
+ = 3.0.3 =
147
+ * Fixed use of depricated WPCF7_Shortcode in favor or WPCF7_FormTag function
148
+ * Updated readme file to bring more attention to adding the hidden field to forms you DO NOT want the CAPTCHA on.
149
+
150
+ = 3.0.2 =
151
+ * Added width and height to inline SVG to account for sizing issues some users have experienced
152
+
153
+ = 3.0.1 =
154
+ * Updated stylesheet version number to help clear old stylesheet from cache
155
+
156
+ = 3.0.0 =
157
+ * Icons have been changed to SVG's to help fix font loading issues on some sites
158
+ * Italian language file has been updated to fix "heart" entry - thanks valesilve
159
+ * Improved inclusion of JavaScript when toggle is active using wp_footer
160
+ * Made CAPTCHA keyboard accessible
161
+
162
+ = 2.4.7 =
163
+ * Added Russian translation
164
+
165
+ = 2.4.6 =
166
+ * Now compatible with "Smart Grid-Layout Design for Contact Form 7" by Aurovrata V.
167
+
168
+ = 2.4.5 =
169
+ * Added fallback styling in the event a theme or plugin changes the icons from a webfont to SVG's
170
+
171
+ = 2.4.4 =
172
+ * Now compatible with "Contact Form 7 Conditional Fields" by Jules Colle
173
+
174
+ = 2.4.3 =
175
+ * Made additional fix to spacing issue with German language
176
+
177
+ = 2.4.2 =
178
+ * Fixed spacing issue with German language
179
+
180
+ = 2.4.1 =
181
+ * Fixed PHP notice "Undefined offset: 0"
182
+ * Fixed PHP notice for another deprecated tag
183
+
184
+ = 2.4 =
185
+ * Added the ability to hide the CAPTCHA until the user interacts with the form, simply add "toggle" to the shortcode: [cf7ic "toggle"]
186
+ * Fixed deprecation notice “wpcf7_add_shortcode is deprecated since Contact Form 7 version 4.6! Use wpcf7_add_form_tag instead.”
187
+
188
+ = 2.3 =
189
+ * Updated FontAwesome library to version 4.7
190
+ * Fixed use of depricated wpcf7_add_shortcode in favor or wpcf7_add_form_tag function
191
+ * Added new toggle attribute (optional) [cf7ic "toggle"] which hides CAPTCHA until user interacts with the form
192
+
193
+ = 2.3 =
194
+ * Added code that allows me to add custom update messages in preparation for a future release that will make this plugin require Contact Form 7 version 4.6 to run due to CF7 making WPCF7_Shortcode and wpcf7_add_shortcode() deprecated, the replacement function and class are not supported by older versions of CF7.
195
+ * Updated text domain to meet new requirements for internationalization
196
+
197
+ = 2.2 =
198
+ * Removed unnecessary code that checked if image captcha existed in the Form
199
+ * Added Italian translation (Thanks Mauro Giuliani)
200
+ * Added Persian translation (Thanks Ava Darabi)
201
+ * Added Spanish (ES) translation (Thanks Erick Carbo)
202
+
203
+ = 2.1 =
204
+ * Added a tag generator button to the contact form 7 form controls so you do not have to manually type in the shortcode into the form. The pro version will eventually include the image captcha styling options.
205
+
206
+ = 2.0 =
207
+ * Refactored code
208
+ * Improved method to include style sheet so its only included when plugin is in use.
209
+ * Fixed validation message, you will now see "Please select an icon." when icon is not selected on submit and "Please select the correct icon." when the wrong icon was selected on submit.
210
+
211
+ = 1.5 =
212
+ * Added Spanish (MX) translation
213
+
214
+ = 1.4 =
215
+ * Updated German translation (Thanks bkmh)
216
+ * Added pro plugin details and link
217
+
218
+ = 1.3 =
219
+ * Added Bulgarian translation (Thanks Plamen Petkov)
220
+
221
+ = 1.2 =
222
+ * Improved German translation (Thanks Te-Punkt)
223
+
224
+ = 1.1 =
225
+ * Updated files and folder name
226
+ * Added German translation
227
+ * Added French translation (Thanks deuns26)
228
+
229
+ = 1.0 =
230
+ * Initial Release
style.css ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ /*--------------------------------------------------------------
2
+ Image Captcha
3
+ --------------------------------------------------------------*/
4
+ .captcha-image {border: 1px solid; padding: 10px; display: inline-block; text-align: center;}
5
+ .cf7ic_instructions {display: block;}
6
+ .captcha-image .cf7ic_instructions span {color: red; font-weight: bold;}
7
+ .captcha-image label {display: inline-block !important; width: 60px !important; position: relative;}
8
+ .captcha-image label > input{opacity: 0; margin: 0; width: 50px; height: 50px; position: absolute;} /* HIDE RADIO */
9
+ .captcha-image svg {padding: 5px; width: 50px; height: 50px;}
10
+ .captcha-image label > input + svg {cursor:pointer; border:2px solid transparent; position: relative; overflow: hidden;} /* IMAGE STYLES */
11
+ .captcha-image label > input:checked + svg, .captcha-image label > input:focus + svg {border:2px solid #f00;} /* (CHECKED) IMAGE STYLES */