Version Description
Download this release
Release Info
Developer | Yuichiro ABE |
Plugin | Contact Form 7 add confirm |
Version | 1.3.8.6 |
Comparing to | |
See all releases |
Code changes from version 1.3.8.5 to 1.3.8.6
- contact-form-7-confirm.php +2 -2
- includes/controller.php +37 -0
- modules/back.php +1 -1
- modules/confirm.php +1 -1
- readme.txt +6 -1
contact-form-7-confirm.php
CHANGED
@@ -7,7 +7,7 @@ Author: Yuichiro ABE
|
|
7 |
Author URI: http://www.eyeta.jp/
|
8 |
Text Domain: contact-form-7-confirm
|
9 |
Domain Path: /languages/
|
10 |
-
Version: 1.3.8.
|
11 |
*/
|
12 |
|
13 |
/* Copyright 2014- Yuichiro ABE (email: y.abe at eyeta.jp)
|
@@ -44,7 +44,7 @@ Version: 1.3.8.5
|
|
44 |
戻って編集ボタンのデフォルトテキストが英語だった件を修正
|
45 |
以降、readme.txtに記述
|
46 |
*/
|
47 |
-
define( 'WPCF7C_VERSION', '1.3.8.
|
48 |
|
49 |
if ( ! defined( 'WPCF7C_PLUGIN_BASENAME' ) )
|
50 |
define( 'WPCF7C_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
7 |
Author URI: http://www.eyeta.jp/
|
8 |
Text Domain: contact-form-7-confirm
|
9 |
Domain Path: /languages/
|
10 |
+
Version: 1.3.8.6
|
11 |
*/
|
12 |
|
13 |
/* Copyright 2014- Yuichiro ABE (email: y.abe at eyeta.jp)
|
44 |
戻って編集ボタンのデフォルトテキストが英語だった件を修正
|
45 |
以降、readme.txtに記述
|
46 |
*/
|
47 |
+
define( 'WPCF7C_VERSION', '1.3.8.6' );
|
48 |
|
49 |
if ( ! defined( 'WPCF7C_PLUGIN_BASENAME' ) )
|
50 |
define( 'WPCF7C_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
includes/controller.php
CHANGED
@@ -11,6 +11,11 @@
|
|
11 |
add_action( 'init', 'wpcf7c_control_init', 10 );
|
12 |
function wpcf7c_control_init() {
|
13 |
wpcf7c_ajax_json_echo();
|
|
|
|
|
|
|
|
|
|
|
14 |
}
|
15 |
|
16 |
|
@@ -50,11 +55,43 @@ function wpcf7c_ajax_json_echo_step1($items, $result) {
|
|
50 |
}
|
51 |
$items["message"] = "";
|
52 |
$items["mailSent"] = false;
|
|
|
|
|
|
|
53 |
}
|
54 |
|
55 |
return $items;
|
56 |
}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
function wpcf7c_ajax_json_echo_step2($items, $result) {
|
59 |
//eyeta_log("wpcf7c_ajax_json_echo_step1");
|
60 |
if($result['mail_sent']) {
|
11 |
add_action( 'init', 'wpcf7c_control_init', 10 );
|
12 |
function wpcf7c_control_init() {
|
13 |
wpcf7c_ajax_json_echo();
|
14 |
+
|
15 |
+
// キャプチャ用フックの差替え
|
16 |
+
remove_filter( 'wpcf7_validate_captchar', 'wpcf7_captcha_validation_filter', 10 );
|
17 |
+
add_filter( 'wpcf7_validate_captchar', 'wpcf7c_captcha_validation_filter', 10, 2 );
|
18 |
+
|
19 |
}
|
20 |
|
21 |
|
55 |
}
|
56 |
$items["message"] = "";
|
57 |
$items["mailSent"] = false;
|
58 |
+
|
59 |
+
unset($items['captcha']);
|
60 |
+
|
61 |
}
|
62 |
|
63 |
return $items;
|
64 |
}
|
65 |
|
66 |
+
/*
|
67 |
+
* captcha対策
|
68 |
+
*/
|
69 |
+
|
70 |
+
function wpcf7c_captcha_validation_filter( $result, $tag ) {
|
71 |
+
$tag = new WPCF7_Shortcode( $tag );
|
72 |
+
|
73 |
+
$type = $tag->type;
|
74 |
+
$name = $tag->name;
|
75 |
+
|
76 |
+
$captchac = '_wpcf7_captcha_challenge_' . $name;
|
77 |
+
|
78 |
+
$prefix = isset( $_POST[$captchac] ) ? (string) $_POST[$captchac] : '';
|
79 |
+
$response = isset( $_POST[$name] ) ? (string) $_POST[$name] : '';
|
80 |
+
|
81 |
+
if ( 0 == strlen( $prefix ) || ! wpcf7_check_captcha( $prefix, $response ) ) {
|
82 |
+
$result['valid'] = false;
|
83 |
+
$result['reason'][$name] = wpcf7_get_message( 'captcha_not_match' );
|
84 |
+
}
|
85 |
+
|
86 |
+
if(0 != strlen( $prefix ) && $_POST["_wpcf7c"] == "step1") {
|
87 |
+
} else if ( 0 != strlen( $prefix )) {
|
88 |
+
wpcf7_remove_captcha( $prefix );
|
89 |
+
}
|
90 |
+
|
91 |
+
return $result;
|
92 |
+
}
|
93 |
+
|
94 |
+
|
95 |
function wpcf7c_ajax_json_echo_step2($items, $result) {
|
96 |
//eyeta_log("wpcf7c_ajax_json_echo_step1");
|
97 |
if($result['mail_sent']) {
|
modules/back.php
CHANGED
@@ -46,7 +46,7 @@ function wpcf7c_add_tag_generator_back() {
|
|
46 |
if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
|
47 |
return;
|
48 |
|
49 |
-
wpcf7_add_tag_generator( 'back', __( 'Back button', 'contact-form-7-confirm' ),
|
50 |
'wpcf7-tg-pane-back', 'wpcf7c_tg_pane_back', array( 'nameless' => 1 ) );
|
51 |
}
|
52 |
|
46 |
if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
|
47 |
return;
|
48 |
|
49 |
+
wpcf7_add_tag_generator( 'back', __( 'Back button', 'contact-form-7-add-confirm' ),
|
50 |
'wpcf7-tg-pane-back', 'wpcf7c_tg_pane_back', array( 'nameless' => 1 ) );
|
51 |
}
|
52 |
|
modules/confirm.php
CHANGED
@@ -46,7 +46,7 @@ function wpcf7c_add_tag_generator_confirm() {
|
|
46 |
if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
|
47 |
return;
|
48 |
//eyeta_log("wpcf7c_add_tag_generator_confirm");
|
49 |
-
wpcf7_add_tag_generator( 'confirm', __( 'Confirm button', 'contact-form-7-confirm' ),
|
50 |
'wpcf7-tg-pane-confirm', 'wpcf7c_tg_pane_confirm', array( 'nameless' => 1 ) );
|
51 |
}
|
52 |
|
46 |
if ( ! function_exists( 'wpcf7_add_tag_generator' ) )
|
47 |
return;
|
48 |
//eyeta_log("wpcf7c_add_tag_generator_confirm");
|
49 |
+
wpcf7_add_tag_generator( 'confirm', __( 'Confirm button', 'contact-form-7-add-confirm' ),
|
50 |
'wpcf7-tg-pane-confirm', 'wpcf7c_tg_pane_confirm', array( 'nameless' => 1 ) );
|
51 |
}
|
52 |
|
readme.txt
CHANGED
@@ -39,6 +39,11 @@ An answer to that question.
|
|
39 |
1.3.8.5
|
40 |
言語ファイルの読み込みバグ対応
|
41 |
Javascript非対応のブラウザの場合、送信ボタンを初期から表示するように変更
|
42 |
-
|
|
|
|
|
43 |
|
44 |
== Upgrade notice ==
|
|
|
|
|
|
39 |
1.3.8.5
|
40 |
言語ファイルの読み込みバグ対応
|
41 |
Javascript非対応のブラウザの場合、送信ボタンを初期から表示するように変更
|
42 |
+
1.3.8.6
|
43 |
+
言語ファイルの読み込みバグ対応
|
44 |
+
captchaで正常に動作していなかった点を修正
|
45 |
|
46 |
== Upgrade notice ==
|
47 |
+
1.3.8.6
|
48 |
+
言語ファイルの読み込みバグ対応
|
49 |
+
captchaで正常に動作していなかった点を修正
|