Plugin Directory

Changeset 3172276


Ignore:
Timestamp:
10/20/2024 10:10:36 AM (17 months ago)
Author:
hookandhook
Message:

3.3.20 | Add aria-labels + style WP Forms captcha

Location:
contact-form-7-image-captcha
Files:
58 added
5 edited

Legend:

Unmodified
Added
Removed
  • contact-form-7-image-captcha/trunk/cf7-image-captcha.php

    r3149747 r3172276  
    44 * Plugin URI:   https://wpimagecaptcha.com/
    55 * Description:  Adds an image CAPTCHA to your "Contact Form 7" and "WPForms" forms.
    6  * Version:      3.3.19
     6 * Version:      3.3.20
    77 * Author:       WP Image CAPTCHA
    88 * Author URI:   https://wpimagecaptcha.com/
  • contact-form-7-image-captcha/trunk/css/cf7ic-style.css

    r2970208 r3172276  
    1414
    1515.captcha-image .cf7ic_instructions span {
    16   color: red;
    1716  font-weight: bold;
    1817}
     
    2221  width: 60px !important;
    2322  position: relative;
    24 }
    25 
    26 .captcha-image label>input {
    27   opacity: 0;
    28   margin: 0;
    29   width: 50px;
    30   height: 50px;
    31   position: absolute;
    3223}
    3324
     
    7465}
    7566
    76 .cf7ic-style1 p {
    77   margin-bottom: 5px;
    78 }
    79 
    80 .cf7ic-style1 p span {
    81   color: red;
    82   font-weight: bold;
    83 }
    84 
    8567.cf7ic-icon-wrapper {
    8668  font-size: inherit;
     
    11092.captcha-image label>input {
    11193  /* Hide radio */
    112   opacity: 0;
    113   width: 0;
    114   height: 0;
    115   min-width: 0;
    116   min-height: 0;
    117   margin: 0;
    118   padding: 0;
     94  opacity: 0 !important;
     95  width: 0 !important;
     96  height: 0 !important;
     97  min-width: 0 !important;
     98  min-height: 0 !important;
     99  margin: 0 !important;
     100  padding: 0 !important;
    119101  border: none !important;
     102  position: absolute !important;
    120103}
    121104
     
    227210  transform: scale(0);
    228211}
     212
     213.cf7ic-wpf {
     214  margin-bottom: 30px !important;
     215}
     216
     217.cf7ic-wpf .captcha-image label {
     218  width: 35px !important;
     219}
     220
     221.cf7ic-wpf .captcha-image label i {
     222  width: 35px !important;
     223  text-align: center;
     224}
     225
     226.cf7ic-wpf .captcha-image .cf7ic-icon-wrapper {
     227  display: block;
     228  text-align: left !important;
     229}
  • contact-form-7-image-captcha/trunk/includes/captcha-generator.php

    r2994933 r3172276  
    6363
    6464    // START of captcha block
    65     $inner = '<span class="wpcf7-form-control-wrap kc_captcha" data-name="kc_captcha"><span class="wpcf7-form-control wpcf7-cf7ic">';
     65    $inner = '<span class="wpcf7-form-control-wrap cf7ic-wpf kc_captcha" data-name="kc_captcha"><span class="wpcf7-form-control wpcf7-cf7ic">';
    6666    $inner .= '<span class="captcha-image cf7ic-style1" style="border:none;">';
    6767    $inner .= '<span class="cf7ic_instructions">';
    6868    $image = '<span>' . $choices[$choice[$human]]['title'] . '</span>';
    69     $inner .= sprintf(esc_html__('Please prove you are human by selecting the', 'contact-form-7-image-captcha') . ' %s.', $image);
     69    $inner .= sprintf(esc_html__('Please prove you are human by selecting the', 'contact-form-7-image-captcha') . ' %s:', $image);
    7070    $inner .= '<span class="cf7ic-icon-wrapper">';
    7171
     
    8383
    8484        $icon = '<i class="fa ' . $iconSet['icon'] . '"></i>';
    85         $inner .= '<label><input type="radio" name="kc_captcha" value="' . $value . '" />' . $icon . '</label>';
     85        $inner .= '<label><input aria-label="' . ($i + 1) . '" type="radio" name="kc_captcha" value="' . $value . '" />' . $icon . '</label>';
    8686    }
    8787
  • contact-form-7-image-captcha/trunk/includes/module-cf7.php

    r3035392 r3172276  
    11<?php
     2
    23/**
    34 * Backend: add custom shortcode to CF7
     
    78{
    89    wp_enqueue_style('cf7ic_style'); // Enqueue CSS
    9    
     10
    1011    wpcf7_add_form_tag('cf7ic', 'call_cf7ic');
    1112}
     
    8081        } else {
    8182            $value = "bot";
    82         }
    83         ;
    84         $output .= '<label><input type="radio" name="kc_captcha" value="' . $value . '" />' . $image . '</label>';
     83        };
     84        $output .= '<label><input aria-label="' . ($i + 1) . '" type="radio" name="kc_captcha" value="' . $value . '" />' . $image . '</label>';
    8585    }
     86
    8687    $output .= '
    8788    </span>
     
    148149        }
    149150    }
    150    
     151
    151152    return $result;
    152153}
     
    177178        </div>
    178179    </div>
    179     <?php
     180<?php
    180181}
  • contact-form-7-image-captcha/trunk/readme.txt

    r3149747 r3172276  
    55Requires PHP: 7.0
    66Tested up to: 6.6
    7 Stable tag: 3.3.19
     7Stable tag: 3.3.20
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    150150== Changelog ==
    151151
    152 = 3.3.18 [09/11/2024] =
     152= 3.3.20 [10/20/2024] =
     153* Add aria-labels + style WP Forms captcha
     154
     155= 3.3.19 [09/11/2024] =
    153156* Clean up
    154157
Note: See TracChangeset for help on using the changeset viewer.