WordPress.org

Plugin Directory

Changeset 1756724


Ignore:
Timestamp:
11/01/17 14:15:14 (7 weeks ago)
Author:
DaoByDesign
Message:

Introduces ability to force W3C compliance.

Location:
contact-form-7-honeypot/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • contact-form-7-honeypot/trunk/honeypot.php

    r1751955 r1756724  
    66Author: Nocean 
    77Author URI: http://www.nocean.ca 
    8 Version: 1.11 
     8Version: 1.12 
    99Text Domain: contact-form-7-honeypot 
    1010Domain Path: /languages/ 
     
    116116    $atts['name'] = $tag->name; 
    117117    $atts['type'] = $tag->type; 
     118    $atts['validautocomplete'] = $tag->get_option('validautocomplete'); 
    118119    $atts['nomessage'] = $tag->get_option('nomessage'); 
    119120    $atts['validation_error'] = $validation_error; 
     
    121122    $inputid = (!empty($atts['id'])) ? 'id="'.$atts['id'].'" ' : ''; 
    122123    $inputid_for = ($inputid) ? 'for="'.$atts['id'].'" ' : ''; 
     124    $autocomplete_value = ($atts['validautocomplete']) ? 'off' : 'nope'; 
     125 
    123126    $html = '<span class="wpcf7-form-control-wrap ' . $atts['name'] . '-wrap" style="'.$atts['css'].'">'; 
    124127    if (!$atts['nomessage']) { 
    125128        $html .= '<label ' . $inputid_for . ' class="hp-message">'.$atts['message'].'</label>'; 
    126129    } 
    127     $html .= '<input ' . $inputid . 'class="' . $atts['class'] . '"  type="text" name="' . $atts['name'] . '" value="" size="40" tabindex="-1" autocomplete="nope" />'; 
     130    $html .= '<input ' . $inputid . 'class="' . $atts['class'] . '"  type="text" name="' . $atts['name'] . '" value="" size="40" tabindex="-1" autocomplete="'.$autocomplete_value.'" />'; 
    128131    $html .= $validation_error . '</span>'; 
    129132 
     
    217220                    <tr> 
    218221                        <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"> 
    219232                            <label for="<?php echo esc_attr( $args['content'] . '-nomessage' ); ?>"><?php echo esc_html( __( 'Disable Accessibility Label (optional)', 'contact-form-7-honeypot' ) ); ?></label> 
    220233                        </th> 
  • contact-form-7-honeypot/trunk/readme.txt

    r1751955 r1756724  
    33Requires at least: 3.5 
    44Tested up to: 4.8.2 
    5 Stable tag: 1.11 
     5Stable tag: 1.12 
    66Contributors: DaoByDesign 
    77Donate link: http://www.nocean.ca/buy-us-a-coffee/ 
     
    6464* Yep! See the **Installation** section for more details and [this Gist](https://gist.github.com/nocean/953b1362b63bd3ecf68c) for examples. 
    6565 
     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 
    6670== Changelog == 
     71= 1.12 = 
     72Introduces ability to force W3C compliance. See [here](https://wordpress.org/support/topic/w3c-validation-in-1-11-explanation-and-work-arounds/) for details. 
     73 
    6774= 1.11 = 
    6875Addresses accessibility concerns regarding a missing label and disables autocomplete to prevent browser autocomplete functions from filling in the field. 
Note: See TracChangeset for help on using the changeset viewer.