Version Description
Download this release
Release Info
Developer | Yuichiro ABE |
Plugin | Contact Form 7 add confirm |
Version | 4.8 |
Comparing to | |
See all releases |
Code changes from version 4.6.2 to 4.8
- contact-form-7-confirm.php +2 -2
- includes/controller.php +18 -4
- readme.txt +6 -3
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: 4.
|
11 |
*/
|
12 |
|
13 |
/* Copyright 2014- Yuichiro ABE (email: y.abe at eyeta.jp)
|
@@ -28,7 +28,7 @@ Version: 4.6.2
|
|
28 |
*/
|
29 |
|
30 |
|
31 |
-
define( 'WPCF7C_VERSION', '4.
|
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: 4.8
|
11 |
*/
|
12 |
|
13 |
/* Copyright 2014- Yuichiro ABE (email: y.abe at eyeta.jp)
|
28 |
*/
|
29 |
|
30 |
|
31 |
+
define( 'WPCF7C_VERSION', '4.8' );
|
32 |
|
33 |
if ( ! defined( 'WPCF7C_PLUGIN_BASENAME' ) )
|
34 |
define( 'WPCF7C_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
includes/controller.php
CHANGED
@@ -198,7 +198,13 @@ 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 ( WPCF7_VERSION
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
if ( 'mail_sent' == $result['status'] ) {
|
203 |
$flag = true;
|
204 |
}
|
@@ -226,6 +232,7 @@ function wpcf7c_ajax_json_echo_step1( $items, $result ) {
|
|
226 |
|
227 |
$items["message"] = "";
|
228 |
$items["mailSent"] = false;
|
|
|
229 |
|
230 |
unset( $items['captcha'] );
|
231 |
|
@@ -287,13 +294,19 @@ function wpcf7c_ajax_json_echo_step2( $items, $result ) {
|
|
287 |
|
288 |
if ( WPCF7_VERSION == '3.9' || WPCF7_VERSION == '3.9.1' ) {
|
289 |
$flag = $items['mailSent'];
|
290 |
-
} else if ( WPCF7_VERSION
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
$flag = $items['mailSent'];
|
292 |
} else {
|
293 |
$flag = $result['mail_sent'];
|
294 |
}
|
295 |
-
|
296 |
-
|
297 |
if ( $flag ) {
|
298 |
if ( ! isset( $items["onSubmit"] ) || $items["onSubmit"] == null ) {
|
299 |
$items["onSubmit"] = array( "wpcf7c_step2('" . $_POST['_wpcf7_unit_tag'] . "');" );
|
@@ -308,5 +321,6 @@ function wpcf7c_ajax_json_echo_step2( $items, $result ) {
|
|
308 |
}
|
309 |
}
|
310 |
|
|
|
311 |
return $items;
|
312 |
}
|
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;
|
204 |
+
} else {
|
205 |
+
$flag = false;
|
206 |
+
}
|
207 |
+
} else if ( version_compare(WPCF7_VERSION, "3.9.2") >= 0 ) {
|
208 |
if ( 'mail_sent' == $result['status'] ) {
|
209 |
$flag = true;
|
210 |
}
|
232 |
|
233 |
$items["message"] = "";
|
234 |
$items["mailSent"] = false;
|
235 |
+
$items["status"] = '';
|
236 |
|
237 |
unset( $items['captcha'] );
|
238 |
|
294 |
|
295 |
if ( WPCF7_VERSION == '3.9' || WPCF7_VERSION == '3.9.1' ) {
|
296 |
$flag = $items['mailSent'];
|
297 |
+
} else if ( version_compare(WPCF7_VERSION, "4.8") >= 0 ) {
|
298 |
+
if($items['status'] == 'mail_sent' ) {
|
299 |
+
$flag = true;
|
300 |
+
} else {
|
301 |
+
$flag = false;
|
302 |
+
}
|
303 |
+
} else if ( version_compare(WPCF7_VERSION, "3.9.2") >= 0 ) {
|
304 |
$flag = $items['mailSent'];
|
305 |
} else {
|
306 |
$flag = $result['mail_sent'];
|
307 |
}
|
308 |
+
// onSentOk
|
309 |
+
//onSubmit
|
310 |
if ( $flag ) {
|
311 |
if ( ! isset( $items["onSubmit"] ) || $items["onSubmit"] == null ) {
|
312 |
$items["onSubmit"] = array( "wpcf7c_step2('" . $_POST['_wpcf7_unit_tag'] . "');" );
|
321 |
}
|
322 |
}
|
323 |
|
324 |
+
|
325 |
return $items;
|
326 |
}
|
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.
|
7 |
-
Stable tag: 4.
|
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
|
@@ -137,7 +137,10 @@ An answer to that question.
|
|
137 |
Contact Form 7 ver.4.6に対応し
|
138 |
wpcf7_add_form_tag関数に対応
|
139 |
|
140 |
-
== Upgrade notice ==
|
141 |
4.6.2
|
142 |
Contact Form 7 ver.4.6に対応し
|
143 |
WPCF7_FormTagに対応
|
|
|
|
|
|
|
|
3 |
Donate link:
|
4 |
Tags: contact, form, contact form
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 4.7.5
|
7 |
+
Stable tag: 4.8
|
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
|
137 |
Contact Form 7 ver.4.6に対応し
|
138 |
wpcf7_add_form_tag関数に対応
|
139 |
|
|
|
140 |
4.6.2
|
141 |
Contact Form 7 ver.4.6に対応し
|
142 |
WPCF7_FormTagに対応
|
143 |
+
|
144 |
+
== Upgrade notice ==
|
145 |
+
4.8
|
146 |
+
Contact Form 7 ver.4.8に対応
|