Version Description
Download this release
Release Info
Developer | Yuichiro ABE |
Plugin | Contact Form 7 add confirm |
Version | 5.0 |
Comparing to | |
See all releases |
Code changes from version 4.8 to 5.0
- contact-form-7-confirm.php +2 -2
- includes/controller.php +12 -2
- includes/js/scripts.js +13 -0
- readme.txt +8 -4
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-add-confirm
|
9 |
Domain Path: /languages/
|
10 |
-
Version:
|
11 |
*/
|
12 |
|
13 |
/* Copyright 2014- Yuichiro ABE (email: y.abe at eyeta.jp)
|
@@ -28,7 +28,7 @@ Version: 4.8
|
|
28 |
*/
|
29 |
|
30 |
|
31 |
-
define( 'WPCF7C_VERSION', '
|
32 |
|
33 |
if ( ! defined( 'WPCF7C_PLUGIN_BASENAME' ) )
|
34 |
define( 'WPCF7C_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
7 |
Author URI: http://www.eyeta.jp/
|
8 |
Text Domain: contact-form-7-add-confirm
|
9 |
Domain Path: /languages/
|
10 |
+
Version: 5.0
|
11 |
*/
|
12 |
|
13 |
/* Copyright 2014- Yuichiro ABE (email: y.abe at eyeta.jp)
|
28 |
*/
|
29 |
|
30 |
|
31 |
+
define( 'WPCF7C_VERSION', '5.0' );
|
32 |
|
33 |
if ( ! defined( 'WPCF7C_PLUGIN_BASENAME' ) )
|
34 |
define( 'WPCF7C_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
includes/controller.php
CHANGED
@@ -198,6 +198,16 @@ function wpcf7c_ajax_json_echo_step1( $items, $result ) {
|
|
198 |
|
199 |
if ( WPCF7_VERSION == '3.9' || WPCF7_VERSION == '3.9.1' ) {
|
200 |
$flag = $wpcf7_confflag;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
} else if ( version_compare(WPCF7_VERSION, "4.8") >= 0 ) {
|
202 |
if($items['status'] == 'mail_sent' ) {
|
203 |
$flag = true;
|
@@ -221,13 +231,13 @@ function wpcf7c_ajax_json_echo_step1( $items, $result ) {
|
|
221 |
}
|
222 |
|
223 |
// オプションによる追加チェック
|
224 |
-
|
225 |
$on_confirm = $form->additional_setting( 'on_confirm', false );
|
226 |
if ( ! empty( $on_confirm ) ) {
|
227 |
foreach ( $on_confirm as $key => $on_confirm_func ) {
|
228 |
$items["onSubmit"][] = wpcf7_strip_quote( $on_confirm_func );
|
229 |
}
|
230 |
-
}
|
231 |
|
232 |
|
233 |
$items["message"] = "";
|
198 |
|
199 |
if ( WPCF7_VERSION == '3.9' || WPCF7_VERSION == '3.9.1' ) {
|
200 |
$flag = $wpcf7_confflag;
|
201 |
+
} else if ( version_compare(WPCF7_VERSION, "5.0") >= 0 ) {
|
202 |
+
if($items['status'] == 'mail_sent' ) {
|
203 |
+
$items["message"] = "";
|
204 |
+
$items["mailSent"] = false;
|
205 |
+
$items["status"] = 'wpcf7c_confirmed';
|
206 |
+
|
207 |
+
unset( $items['captcha'] );
|
208 |
+
return $items;
|
209 |
+
}
|
210 |
+
|
211 |
} else if ( version_compare(WPCF7_VERSION, "4.8") >= 0 ) {
|
212 |
if($items['status'] == 'mail_sent' ) {
|
213 |
$flag = true;
|
231 |
}
|
232 |
|
233 |
// オプションによる追加チェック
|
234 |
+
/*$form = WPCF7_ContactForm::get_current();
|
235 |
$on_confirm = $form->additional_setting( 'on_confirm', false );
|
236 |
if ( ! empty( $on_confirm ) ) {
|
237 |
foreach ( $on_confirm as $key => $on_confirm_func ) {
|
238 |
$items["onSubmit"][] = wpcf7_strip_quote( $on_confirm_func );
|
239 |
}
|
240 |
+
}*/
|
241 |
|
242 |
|
243 |
$items["message"] = "";
|
includes/js/scripts.js
CHANGED
@@ -216,3 +216,16 @@ var wpcf7c_step2_error = function(unit_tag) {
|
|
216 |
|
217 |
}
|
218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
|
217 |
}
|
218 |
|
219 |
+
|
220 |
+
document.addEventListener( 'wpcf7submit', function( event ) {
|
221 |
+
switch ( event.detail.status ) {
|
222 |
+
case 'wpcf7c_confirmed':
|
223 |
+
wpcf7c_step1(event.detail.id);
|
224 |
+
break;
|
225 |
+
case 'mail_sent':
|
226 |
+
wpcf7c_step2(event.detail.id);
|
227 |
+
break;
|
228 |
+
|
229 |
+
}
|
230 |
+
}, false );
|
231 |
+
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Yuichiro ABE
|
|
3 |
Donate link:
|
4 |
Tags: contact, form, contact form
|
5 |
Requires at least: 3.8
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag:
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Text Domain: contact-form-7-add-confirm
|
@@ -141,6 +141,10 @@ An answer to that question.
|
|
141 |
Contact Form 7 ver.4.6に対応し
|
142 |
WPCF7_FormTagに対応
|
143 |
|
144 |
-
== Upgrade notice ==
|
145 |
4.8
|
146 |
-
Contact Form 7 ver.4.8に対応
|
|
|
|
|
|
|
|
|
|
3 |
Donate link:
|
4 |
Tags: contact, form, contact form
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 4.9.3
|
7 |
+
Stable tag: 5.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Text Domain: contact-form-7-add-confirm
|
141 |
Contact Form 7 ver.4.6に対応し
|
142 |
WPCF7_FormTagに対応
|
143 |
|
|
|
144 |
4.8
|
145 |
+
Contact Form 7 ver.4.8に対応
|
146 |
+
|
147 |
+
== Upgrade notice ==
|
148 |
+
5.0
|
149 |
+
Contact Form 7 ver.5.0に対応
|
150 |
+
|