Changeset 2629390
- Timestamp:
- 11/14/2021 12:09:25 PM (4 years ago)
- Location:
- watts
- Files:
-
- 2 added
- 5 edited
- 2 copied
-
tags/1.1.0 (copied) (copied from watts/trunk)
-
tags/1.1.0/modules/confirm-email.php (added)
-
tags/1.1.0/modules/dob.php (modified) (7 diffs)
-
tags/1.1.0/readme.txt (copied) (copied from watts/trunk/readme.txt) (3 diffs)
-
tags/1.1.0/watts.php (modified) (2 diffs)
-
trunk/modules/confirm-email.php (added)
-
trunk/modules/dob.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/watts.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
watts/tags/1.1.0/modules/dob.php
r2628083 r2629390 162 162 if ($tag->is_required()) { 163 163 // 必須項目 164 $result->invalidate( $name, '必須項目に入力してください。');164 $result->invalidate( $tag, wpcf7_get_message( 'invalid_required' ) ); 165 165 } 166 166 // 必須項目ではなく、全て入力されていない場合は許容 167 167 } else if (in_array(true, $blank_flags, true) !== false) { 168 168 // 中途半端な入力 169 $result->invalidate( $name, '不正な日付です。');169 $result->invalidate( $tag, wpcf7_get_message( 'invalid_date' ) ); 170 170 } else if (in_array(false, array_map('is_numeric', array_values($values)), true)) { 171 171 // 数値かどうか 172 $result->invalidate( $name, '不正な入力値です。');172 $result->invalidate( $tag, wpcf7_get_message( 'invalid_date' ) ); 173 173 } else if (!checkdate($values['month'], $values['day'], $values['year'])) { 174 174 // 数値が入力されていた場合のチェック 175 $result->invalidate( $name, '存在しない日付です。');175 $result->invalidate( $tag, __('The date specified is not a valid date value.', 'watts')); 176 176 } 177 177 … … 179 179 } 180 180 181 add_action('wpcf7_admin_init', 'watts_add_tag_generator_dob', 19, 0);181 add_action('wpcf7_admin_init', 'watts_add_tag_generator_dob', 20, 0); 182 182 183 183 function watts_add_tag_generator_dob() 184 184 { 185 185 $tag_generator = WPCF7_TagGenerator::get_instance(); 186 $tag_generator->add('dob', __(' 生年月日', 'contact-form-7'),186 $tag_generator->add('dob', __('DOB', 'watts'), 187 187 'watts_tag_generator_dob'); 188 188 } … … 193 193 $type = 'dob'; 194 194 195 $description = '生年月日入力項目のフォームタグを生成します。';195 $description = __( "Generate a form-tag for a date of birth input field.", 'watts' ); 196 196 197 197 ?> … … 203 203 <tbody> 204 204 <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> 206 206 <td> 207 207 <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> 210 210 </fieldset> 211 211 </td> … … 213 213 214 214 <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> 216 216 <td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr($args['content'] . '-name'); ?>" /></td> 217 217 </tr> 218 218 219 219 <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> 221 221 <td><input type="text" name="values" class="oneline" id="<?php echo esc_attr($args['content'] . '-values'); ?>" /><br /> 222 222 </tr> 223 223 224 224 <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> 226 226 <td> 227 227 <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> 230 230 </fieldset> 231 231 </td> … … 233 233 234 234 <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> 236 236 <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr($args['content'] . '-id'); ?>" /></td> 237 237 </tr> 238 238 239 239 <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> 241 241 <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr($args['content'] . '-class'); ?>" /></td> 242 242 </tr> … … 250 250 251 251 <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')); ?>" /> 253 253 </div> 254 254 255 255 <br class="clear" /> 256 256 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> 258 258 </div> 259 259 <?php -
watts/tags/1.1.0/readme.txt
r2628569 r2629390 2 2 Contributors: solaito 3 3 Donate link: https://wp-watts.com/ 4 Tags: f rom, contact form, efo, ajax4 Tags: form, contact form, efo, ajax 5 5 Requires at least: 5.7 6 6 Tested up to: 5.8 7 7 Requires PHP: 5.6 8 Stable tag: 1. 0.08 Stable tag: 1.1.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html 11 11 12 EFO(Entry Form Optimization) for your Contact Form 7.12 The Watts will performs EFO(Entry Form Optimization) for your Contact Form 7. 13 13 14 14 == Description == 15 15 16 EFO(Entry Form Optimization) for your Contact Form 7.16 The Watts will performs EFO(Entry Form Optimization) for your Contact Form 7. 17 17 18 18 This plugin provides the following featreus. … … 27 27 Adding input fields. 28 28 29 * Confirm e-mail address 29 30 * Date of birth (Only Japanese available) 30 31 … … 56 57 == Changelog == 57 58 59 = 1.1.0 = 60 * Add confirm e-mail address input field. 61 * Translation support. 62 * Fix readmme.txt. 63 58 64 = 1.0.0 = 59 65 * First Release. -
watts/tags/1.1.0/watts.php
r2628083 r2629390 3 3 * Plugin Name: Watts 4 4 * 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. 6 6 * Author: s.matsuura 7 7 * Author URI: https://github.com/solaito/ 8 8 * Text Domain: watts 9 9 * Domain Path: /languages 10 * Version: 1. 0.010 * Version: 1.1.0 11 11 * 12 12 * @package Watts … … 19 19 require_once "modules/dob.php"; 20 20 } 21 require_once "modules/confirm-email.php"; 21 22 22 23 add_action('wp_enqueue_scripts', 'watts_enqueue_scripts'); -
watts/trunk/modules/dob.php
r2628083 r2629390 162 162 if ($tag->is_required()) { 163 163 // 必須項目 164 $result->invalidate( $name, '必須項目に入力してください。');164 $result->invalidate( $tag, wpcf7_get_message( 'invalid_required' ) ); 165 165 } 166 166 // 必須項目ではなく、全て入力されていない場合は許容 167 167 } else if (in_array(true, $blank_flags, true) !== false) { 168 168 // 中途半端な入力 169 $result->invalidate( $name, '不正な日付です。');169 $result->invalidate( $tag, wpcf7_get_message( 'invalid_date' ) ); 170 170 } else if (in_array(false, array_map('is_numeric', array_values($values)), true)) { 171 171 // 数値かどうか 172 $result->invalidate( $name, '不正な入力値です。');172 $result->invalidate( $tag, wpcf7_get_message( 'invalid_date' ) ); 173 173 } else if (!checkdate($values['month'], $values['day'], $values['year'])) { 174 174 // 数値が入力されていた場合のチェック 175 $result->invalidate( $name, '存在しない日付です。');175 $result->invalidate( $tag, __('The date specified is not a valid date value.', 'watts')); 176 176 } 177 177 … … 179 179 } 180 180 181 add_action('wpcf7_admin_init', 'watts_add_tag_generator_dob', 19, 0);181 add_action('wpcf7_admin_init', 'watts_add_tag_generator_dob', 20, 0); 182 182 183 183 function watts_add_tag_generator_dob() 184 184 { 185 185 $tag_generator = WPCF7_TagGenerator::get_instance(); 186 $tag_generator->add('dob', __(' 生年月日', 'contact-form-7'),186 $tag_generator->add('dob', __('DOB', 'watts'), 187 187 'watts_tag_generator_dob'); 188 188 } … … 193 193 $type = 'dob'; 194 194 195 $description = '生年月日入力項目のフォームタグを生成します。';195 $description = __( "Generate a form-tag for a date of birth input field.", 'watts' ); 196 196 197 197 ?> … … 203 203 <tbody> 204 204 <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> 206 206 <td> 207 207 <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> 210 210 </fieldset> 211 211 </td> … … 213 213 214 214 <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> 216 216 <td><input type="text" name="name" class="tg-name oneline" id="<?php echo esc_attr($args['content'] . '-name'); ?>" /></td> 217 217 </tr> 218 218 219 219 <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> 221 221 <td><input type="text" name="values" class="oneline" id="<?php echo esc_attr($args['content'] . '-values'); ?>" /><br /> 222 222 </tr> 223 223 224 224 <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> 226 226 <td> 227 227 <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> 230 230 </fieldset> 231 231 </td> … … 233 233 234 234 <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> 236 236 <td><input type="text" name="id" class="idvalue oneline option" id="<?php echo esc_attr($args['content'] . '-id'); ?>" /></td> 237 237 </tr> 238 238 239 239 <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> 241 241 <td><input type="text" name="class" class="classvalue oneline option" id="<?php echo esc_attr($args['content'] . '-class'); ?>" /></td> 242 242 </tr> … … 250 250 251 251 <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')); ?>" /> 253 253 </div> 254 254 255 255 <br class="clear" /> 256 256 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> 258 258 </div> 259 259 <?php -
watts/trunk/readme.txt
r2628569 r2629390 2 2 Contributors: solaito 3 3 Donate link: https://wp-watts.com/ 4 Tags: f rom, contact form, efo, ajax4 Tags: form, contact form, efo, ajax 5 5 Requires at least: 5.7 6 6 Tested up to: 5.8 7 7 Requires PHP: 5.6 8 Stable tag: 1. 0.08 Stable tag: 1.1.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html 11 11 12 EFO(Entry Form Optimization) for your Contact Form 7.12 The Watts will performs EFO(Entry Form Optimization) for your Contact Form 7. 13 13 14 14 == Description == 15 15 16 EFO(Entry Form Optimization) for your Contact Form 7.16 The Watts will performs EFO(Entry Form Optimization) for your Contact Form 7. 17 17 18 18 This plugin provides the following featreus. … … 27 27 Adding input fields. 28 28 29 * Confirm e-mail address 29 30 * Date of birth (Only Japanese available) 30 31 … … 56 57 == Changelog == 57 58 59 = 1.1.0 = 60 * Add confirm e-mail address input field. 61 * Translation support. 62 * Fix readmme.txt. 63 58 64 = 1.0.0 = 59 65 * First Release. -
watts/trunk/watts.php
r2628083 r2629390 3 3 * Plugin Name: Watts 4 4 * 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. 6 6 * Author: s.matsuura 7 7 * Author URI: https://github.com/solaito/ 8 8 * Text Domain: watts 9 9 * Domain Path: /languages 10 * Version: 1. 0.010 * Version: 1.1.0 11 11 * 12 12 * @package Watts … … 19 19 require_once "modules/dob.php"; 20 20 } 21 require_once "modules/confirm-email.php"; 21 22 22 23 add_action('wp_enqueue_scripts', 'watts_enqueue_scripts');
Note: See TracChangeset
for help on using the changeset viewer.