Plugin Directory

Changeset 2629390


Ignore:
Timestamp:
11/14/2021 12:09:25 PM (4 years ago)
Author:
solaito
Message:

Release v1.1.0

Location:
watts
Files:
2 added
5 edited
2 copied

Legend:

Unmodified
Added
Removed
  • watts/tags/1.1.0/modules/dob.php

    r2628083 r2629390  
    162162        if ($tag->is_required()) {
    163163            // 必須項目
    164             $result->invalidate($name, '必須項目に入力してください。');
     164            $result->invalidate( $tag, wpcf7_get_message( 'invalid_required' ) );
    165165        }
    166166        // 必須項目ではなく、全て入力されていない場合は許容
    167167    } else if (in_array(true, $blank_flags, true) !== false) {
    168168        // 中途半端な入力
    169         $result->invalidate($name, '不正な日付です。');
     169        $result->invalidate( $tag, wpcf7_get_message( 'invalid_date' ) );
    170170    } else if (in_array(false, array_map('is_numeric', array_values($values)), true)) {
    171171        // 数値かどうか
    172         $result->invalidate($name, '不正な入力値です。');
     172        $result->invalidate( $tag, wpcf7_get_message( 'invalid_date' ) );
    173173    } else if (!checkdate($values['month'], $values['day'], $values['year'])) {
    174174        // 数値が入力されていた場合のチェック
    175         $result->invalidate($name, '存在しない日付です。');
     175        $result->invalidate( $tag, __('The date specified is not a valid date value.', 'watts'));
    176176    }
    177177
     
    179179}
    180180
    181 add_action('wpcf7_admin_init', 'watts_add_tag_generator_dob', 19, 0);
     181add_action('wpcf7_admin_init', 'watts_add_tag_generator_dob', 20, 0);
    182182
    183183function watts_add_tag_generator_dob()
    184184{
    185185    $tag_generator = WPCF7_TagGenerator::get_instance();
    186     $tag_generator->add('dob', __('生年月日', 'contact-form-7'),
     186    $tag_generator->add('dob', __('DOB', 'watts'),
    187187        'watts_tag_generator_dob');
    188188}
     
    193193    $type = 'dob';
    194194
    195     $description = '生年月日入力項目のフォームタグを生成します。';
     195    $description = __( "Generate a form-tag for a date of birth input field.", 'watts' );
    196196
    197197    ?>
     
    203203<tbody>
    204204    <tr>
    205     <th scope="row"><?php echo esc_html(__('Field type', 'contact-form-7')); ?></th>
     205    <th scope="row"><?php echo esc_html(__('Field type', 'watts')); ?></th>
    206206    <td>
    207207        <fieldset>
    208         <legend class="screen-reader-text"><?php echo esc_html(__('Field type', 'contact-form-7')); ?></legend>
    209         <label><input type="checkbox" name="required" /> <?php echo esc_html(__('Required field', 'contact-form-7')); ?></label>
     208        <legend class="screen-reader-text"><?php echo esc_html(__('Field type', 'watts')); ?></legend>
     209        <label><input type="checkbox" name="required" /> <?php echo esc_html(__('Required field', 'watts')); ?></label>
    210210        </fieldset>
    211211    </td>
     
    213213
    214214    <tr>
    215     <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-name'); ?>"><?php echo esc_html(__('Name', 'contact-form-7')); ?></label></th>
     215    <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-name'); ?>"><?php echo esc_html(__('Name', 'watts')); ?></label></th>
    216216    <td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr($args['content'] . '-name'); ?>" /></td>
    217217    </tr>
    218218
    219219    <tr>
    220     <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-values'); ?>"><?php echo esc_html(__('Default value', 'contact-form-7')); ?></label></th>
     220    <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-values'); ?>"><?php echo esc_html(__('Default value', 'watts')); ?></label></th>
    221221    <td><input type="text" name="values" class="oneline" id="<?php echo esc_attr($args['content'] . '-values'); ?>" /><br />
    222222    </tr>
    223223
    224224    <tr>
    225     <th scope="row"><?php echo esc_html(__('Options', 'contact-form-7')); ?></th>
     225    <th scope="row"><?php echo esc_html(__('Options', 'watts')); ?></th>
    226226    <td>
    227227        <fieldset>
    228         <legend class="screen-reader-text"><?php echo esc_html(__('Options', 'contact-form-7')); ?></legend>
    229         <label><input type="checkbox" name="include_blank" class="option" /> <?php echo esc_html(__('Insert a blank item as the first option', 'contact-form-7')); ?></label>
     228        <legend class="screen-reader-text"><?php echo esc_html(__('Options', 'watts')); ?></legend>
     229        <label><input type="checkbox" name="include_blank" class="option" /> <?php echo esc_html(__('Insert a blank item as the first option', 'watts')); ?></label>
    230230        </fieldset>
    231231    </td>
     
    233233
    234234    <tr>
    235     <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-id'); ?>"><?php echo esc_html(__('Id attribute', 'contact-form-7')); ?></label></th>
     235    <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-id'); ?>"><?php echo esc_html(__('Id attribute', 'watts')); ?></label></th>
    236236    <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr($args['content'] . '-id'); ?>" /></td>
    237237    </tr>
    238238
    239239    <tr>
    240     <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-class'); ?>"><?php echo esc_html(__('Class attribute', 'contact-form-7')); ?></label></th>
     240    <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-class'); ?>"><?php echo esc_html(__('Class attribute', 'watts')); ?></label></th>
    241241    <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr($args['content'] . '-class'); ?>" /></td>
    242242    </tr>
     
    250250
    251251    <div class="submitbox">
    252     <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr(__('Insert Tag', 'contact-form-7')); ?>" />
     252    <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr(__('Insert Tag', 'watts')); ?>" />
    253253    </div>
    254254
    255255    <br class="clear" />
    256256
    257     <p class="description mail-tag"><label for="<?php echo esc_attr($args['content'] . '-mailtag'); ?>"><?php echo sprintf(esc_html(__("To use the value input through this field in a mail field, you need to insert the corresponding mail-tag (%s) into the field on the Mail tab.", 'contact-form-7')), '<strong><span class="mail-tag"></span></strong>'); ?><input type="text" class="mail-tag code hidden" readonly="readonly" id="<?php echo esc_attr($args['content'] . '-mailtag'); ?>" /></label></p>
     257    <p class="description mail-tag"><label for="<?php echo esc_attr($args['content'] . '-mailtag'); ?>"><?php echo sprintf(esc_html(__("To use the value input through this field in a mail field, you need to insert the corresponding mail-tag (%s) into the field on the Mail tab.", 'watts')), '<strong><span class="mail-tag"></span></strong>'); ?><input type="text" class="mail-tag code hidden" readonly="readonly" id="<?php echo esc_attr($args['content'] . '-mailtag'); ?>" /></label></p>
    258258</div>
    259259<?php
  • watts/tags/1.1.0/readme.txt

    r2628569 r2629390  
    22Contributors: solaito
    33Donate link: https://wp-watts.com/
    4 Tags: from, contact form, efo, ajax
     4Tags: form, contact form, efo, ajax
    55Requires at least: 5.7
    66Tested up to: 5.8
    77Requires PHP: 5.6
    8 Stable tag: 1.0.0
     8Stable tag: 1.1.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1111
    12 EFO(Entry Form Optimization) for your Contact Form 7.
     12The Watts will performs EFO(Entry Form Optimization) for your Contact Form 7.
    1313
    1414== Description ==
    1515
    16 EFO(Entry Form Optimization) for your Contact Form 7.
     16The Watts will performs EFO(Entry Form Optimization) for your Contact Form 7.
    1717
    1818This plugin provides the following featreus.
     
    2727Adding input fields.
    2828
     29* Confirm e-mail address
    2930* Date of birth (Only Japanese available)
    3031
     
    5657== Changelog ==
    5758
     59= 1.1.0 =
     60* Add confirm e-mail address input field.
     61* Translation support.
     62* Fix readmme.txt.
     63
    5864= 1.0.0 =
    5965* First Release.
  • watts/tags/1.1.0/watts.php

    r2628083 r2629390  
    33 * Plugin Name:     Watts
    44 * Plugin URI:      https://wp-watts.com/
    5  * Description:     EFO for Contact Form 7.
     5 * Description:     The Watts will performs EFO(Entry Form Optimization) for your Contact Form 7.
    66 * Author:          s.matsuura
    77 * Author URI:      https://github.com/solaito/
    88 * Text Domain:     watts
    99 * Domain Path:     /languages
    10  * Version:         1.0.0
     10 * Version:         1.1.0
    1111 *
    1212 * @package         Watts
     
    1919    require_once "modules/dob.php";
    2020}
     21require_once "modules/confirm-email.php";
    2122
    2223add_action('wp_enqueue_scripts', 'watts_enqueue_scripts');
  • watts/trunk/modules/dob.php

    r2628083 r2629390  
    162162        if ($tag->is_required()) {
    163163            // 必須項目
    164             $result->invalidate($name, '必須項目に入力してください。');
     164            $result->invalidate( $tag, wpcf7_get_message( 'invalid_required' ) );
    165165        }
    166166        // 必須項目ではなく、全て入力されていない場合は許容
    167167    } else if (in_array(true, $blank_flags, true) !== false) {
    168168        // 中途半端な入力
    169         $result->invalidate($name, '不正な日付です。');
     169        $result->invalidate( $tag, wpcf7_get_message( 'invalid_date' ) );
    170170    } else if (in_array(false, array_map('is_numeric', array_values($values)), true)) {
    171171        // 数値かどうか
    172         $result->invalidate($name, '不正な入力値です。');
     172        $result->invalidate( $tag, wpcf7_get_message( 'invalid_date' ) );
    173173    } else if (!checkdate($values['month'], $values['day'], $values['year'])) {
    174174        // 数値が入力されていた場合のチェック
    175         $result->invalidate($name, '存在しない日付です。');
     175        $result->invalidate( $tag, __('The date specified is not a valid date value.', 'watts'));
    176176    }
    177177
     
    179179}
    180180
    181 add_action('wpcf7_admin_init', 'watts_add_tag_generator_dob', 19, 0);
     181add_action('wpcf7_admin_init', 'watts_add_tag_generator_dob', 20, 0);
    182182
    183183function watts_add_tag_generator_dob()
    184184{
    185185    $tag_generator = WPCF7_TagGenerator::get_instance();
    186     $tag_generator->add('dob', __('生年月日', 'contact-form-7'),
     186    $tag_generator->add('dob', __('DOB', 'watts'),
    187187        'watts_tag_generator_dob');
    188188}
     
    193193    $type = 'dob';
    194194
    195     $description = '生年月日入力項目のフォームタグを生成します。';
     195    $description = __( "Generate a form-tag for a date of birth input field.", 'watts' );
    196196
    197197    ?>
     
    203203<tbody>
    204204    <tr>
    205     <th scope="row"><?php echo esc_html(__('Field type', 'contact-form-7')); ?></th>
     205    <th scope="row"><?php echo esc_html(__('Field type', 'watts')); ?></th>
    206206    <td>
    207207        <fieldset>
    208         <legend class="screen-reader-text"><?php echo esc_html(__('Field type', 'contact-form-7')); ?></legend>
    209         <label><input type="checkbox" name="required" /> <?php echo esc_html(__('Required field', 'contact-form-7')); ?></label>
     208        <legend class="screen-reader-text"><?php echo esc_html(__('Field type', 'watts')); ?></legend>
     209        <label><input type="checkbox" name="required" /> <?php echo esc_html(__('Required field', 'watts')); ?></label>
    210210        </fieldset>
    211211    </td>
     
    213213
    214214    <tr>
    215     <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-name'); ?>"><?php echo esc_html(__('Name', 'contact-form-7')); ?></label></th>
     215    <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-name'); ?>"><?php echo esc_html(__('Name', 'watts')); ?></label></th>
    216216    <td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr($args['content'] . '-name'); ?>" /></td>
    217217    </tr>
    218218
    219219    <tr>
    220     <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-values'); ?>"><?php echo esc_html(__('Default value', 'contact-form-7')); ?></label></th>
     220    <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-values'); ?>"><?php echo esc_html(__('Default value', 'watts')); ?></label></th>
    221221    <td><input type="text" name="values" class="oneline" id="<?php echo esc_attr($args['content'] . '-values'); ?>" /><br />
    222222    </tr>
    223223
    224224    <tr>
    225     <th scope="row"><?php echo esc_html(__('Options', 'contact-form-7')); ?></th>
     225    <th scope="row"><?php echo esc_html(__('Options', 'watts')); ?></th>
    226226    <td>
    227227        <fieldset>
    228         <legend class="screen-reader-text"><?php echo esc_html(__('Options', 'contact-form-7')); ?></legend>
    229         <label><input type="checkbox" name="include_blank" class="option" /> <?php echo esc_html(__('Insert a blank item as the first option', 'contact-form-7')); ?></label>
     228        <legend class="screen-reader-text"><?php echo esc_html(__('Options', 'watts')); ?></legend>
     229        <label><input type="checkbox" name="include_blank" class="option" /> <?php echo esc_html(__('Insert a blank item as the first option', 'watts')); ?></label>
    230230        </fieldset>
    231231    </td>
     
    233233
    234234    <tr>
    235     <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-id'); ?>"><?php echo esc_html(__('Id attribute', 'contact-form-7')); ?></label></th>
     235    <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-id'); ?>"><?php echo esc_html(__('Id attribute', 'watts')); ?></label></th>
    236236    <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr($args['content'] . '-id'); ?>" /></td>
    237237    </tr>
    238238
    239239    <tr>
    240     <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-class'); ?>"><?php echo esc_html(__('Class attribute', 'contact-form-7')); ?></label></th>
     240    <th scope="row"><label for="<?php echo esc_attr($args['content'] . '-class'); ?>"><?php echo esc_html(__('Class attribute', 'watts')); ?></label></th>
    241241    <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr($args['content'] . '-class'); ?>" /></td>
    242242    </tr>
     
    250250
    251251    <div class="submitbox">
    252     <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr(__('Insert Tag', 'contact-form-7')); ?>" />
     252    <input type="button" class="button button-primary insert-tag" value="<?php echo esc_attr(__('Insert Tag', 'watts')); ?>" />
    253253    </div>
    254254
    255255    <br class="clear" />
    256256
    257     <p class="description mail-tag"><label for="<?php echo esc_attr($args['content'] . '-mailtag'); ?>"><?php echo sprintf(esc_html(__("To use the value input through this field in a mail field, you need to insert the corresponding mail-tag (%s) into the field on the Mail tab.", 'contact-form-7')), '<strong><span class="mail-tag"></span></strong>'); ?><input type="text" class="mail-tag code hidden" readonly="readonly" id="<?php echo esc_attr($args['content'] . '-mailtag'); ?>" /></label></p>
     257    <p class="description mail-tag"><label for="<?php echo esc_attr($args['content'] . '-mailtag'); ?>"><?php echo sprintf(esc_html(__("To use the value input through this field in a mail field, you need to insert the corresponding mail-tag (%s) into the field on the Mail tab.", 'watts')), '<strong><span class="mail-tag"></span></strong>'); ?><input type="text" class="mail-tag code hidden" readonly="readonly" id="<?php echo esc_attr($args['content'] . '-mailtag'); ?>" /></label></p>
    258258</div>
    259259<?php
  • watts/trunk/readme.txt

    r2628569 r2629390  
    22Contributors: solaito
    33Donate link: https://wp-watts.com/
    4 Tags: from, contact form, efo, ajax
     4Tags: form, contact form, efo, ajax
    55Requires at least: 5.7
    66Tested up to: 5.8
    77Requires PHP: 5.6
    8 Stable tag: 1.0.0
     8Stable tag: 1.1.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1111
    12 EFO(Entry Form Optimization) for your Contact Form 7.
     12The Watts will performs EFO(Entry Form Optimization) for your Contact Form 7.
    1313
    1414== Description ==
    1515
    16 EFO(Entry Form Optimization) for your Contact Form 7.
     16The Watts will performs EFO(Entry Form Optimization) for your Contact Form 7.
    1717
    1818This plugin provides the following featreus.
     
    2727Adding input fields.
    2828
     29* Confirm e-mail address
    2930* Date of birth (Only Japanese available)
    3031
     
    5657== Changelog ==
    5758
     59= 1.1.0 =
     60* Add confirm e-mail address input field.
     61* Translation support.
     62* Fix readmme.txt.
     63
    5864= 1.0.0 =
    5965* First Release.
  • watts/trunk/watts.php

    r2628083 r2629390  
    33 * Plugin Name:     Watts
    44 * Plugin URI:      https://wp-watts.com/
    5  * Description:     EFO for Contact Form 7.
     5 * Description:     The Watts will performs EFO(Entry Form Optimization) for your Contact Form 7.
    66 * Author:          s.matsuura
    77 * Author URI:      https://github.com/solaito/
    88 * Text Domain:     watts
    99 * Domain Path:     /languages
    10  * Version:         1.0.0
     10 * Version:         1.1.0
    1111 *
    1212 * @package         Watts
     
    1919    require_once "modules/dob.php";
    2020}
     21require_once "modules/confirm-email.php";
    2122
    2223add_action('wp_enqueue_scripts', 'watts_enqueue_scripts');
Note: See TracChangeset for help on using the changeset viewer.