Version Description
- New feature: delay redirection in milliseconds.
Download this release
Release Info
Developer | yuvalsabar |
Plugin | Contact Form 7 Redirection |
Version | 1.3.2 |
Comparing to | |
See all releases |
Code changes from version 1.3.1 to 1.3.2
- admin/wpcf7-redirect-admin-script.js +1 -0
- js/wpcf7-redirect-script.js +15 -2
- readme.txt +13 -2
- wpcf7-redirect.php +13 -2
admin/wpcf7-redirect-admin-script.js
CHANGED
@@ -62,4 +62,5 @@ jQuery(document).ready(function($) {
|
|
62 |
sign = window.location.href.indexOf("?") > -1 ? '&' : '?';
|
63 |
location.href = window.location.href + sign + 'wpcf7_redirect_dismiss_banner=1';
|
64 |
});
|
|
|
65 |
});
|
62 |
sign = window.location.href.indexOf("?") > -1 ? '&' : '?';
|
63 |
location.href = window.location.href + sign + 'wpcf7_redirect_dismiss_banner=1';
|
64 |
});
|
65 |
+
|
66 |
});
|
js/wpcf7-redirect-script.js
CHANGED
@@ -39,11 +39,24 @@ function wpcf7_redirect_mailsent_handler() {
|
|
39 |
// Redirect
|
40 |
if ( redirect_url ) {
|
41 |
if ( ! form.open_in_new_tab ) {
|
|
|
42 |
// Open in current tab
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
} else {
|
45 |
// Open in external tab
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
48 |
}
|
49 |
|
39 |
// Redirect
|
40 |
if ( redirect_url ) {
|
41 |
if ( ! form.open_in_new_tab ) {
|
42 |
+
console.log(form);
|
43 |
// Open in current tab
|
44 |
+
if ( form.delay_redirect ) {
|
45 |
+
setTimeout(function() {
|
46 |
+
location.href = redirect_url;
|
47 |
+
}, form.delay_redirect);
|
48 |
+
} else {
|
49 |
+
location.href = redirect_url;
|
50 |
+
}
|
51 |
} else {
|
52 |
// Open in external tab
|
53 |
+
if ( form.delay_redirect ) {
|
54 |
+
setTimeout(function() {
|
55 |
+
window.open( redirect_url );
|
56 |
+
}, form.delay_redirect);
|
57 |
+
} else {
|
58 |
+
window.open( redirect_url );
|
59 |
+
}
|
60 |
}
|
61 |
}
|
62 |
|
readme.txt
CHANGED
@@ -2,8 +2,16 @@
|
|
2 |
Tags: contact form 7 redirect, contact form 7 thank you page, redirect cf7, redirect contact form 7, contact form 7 success page, cf7 redirect
|
3 |
Contributors: yuvalsabar
|
4 |
Requires at least: 4.7.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
Tested up to: 5.1.1
|
6 |
Stable tag: 1.3.0
|
|
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -69,6 +77,9 @@ No. One of the reasons we developed this plugin, is because on_send_ok is now de
|
|
69 |
|
70 |
== Changelog ==
|
71 |
|
|
|
|
|
|
|
72 |
= 1.3.1 =
|
73 |
* Fixed a bug in legacy browsers: the Pro message keep showing.
|
74 |
|
@@ -102,11 +113,11 @@ No. One of the reasons we developed this plugin, is because on_send_ok is now de
|
|
102 |
* Dev improvements.
|
103 |
|
104 |
= 1.2 =
|
105 |
-
*
|
106 |
|
107 |
= 1.0.2 =
|
108 |
* Added full support for form duplication.
|
109 |
-
*
|
110 |
* Added plugin class CF7_Redirect.
|
111 |
|
112 |
= 1.0.0 =
|
2 |
Tags: contact form 7 redirect, contact form 7 thank you page, redirect cf7, redirect contact form 7, contact form 7 success page, cf7 redirect
|
3 |
Contributors: yuvalsabar
|
4 |
Requires at least: 4.7.0
|
5 |
+
<<<<<<< .mine
|
6 |
+
Tested up to: 5.2.1
|
7 |
+
Stable tag: 1.3.2
|
8 |
+
||||||| .r2047940
|
9 |
+
Tested up to: 5.0
|
10 |
+
Stable tag: 1.3.0
|
11 |
+
=======
|
12 |
Tested up to: 5.1.1
|
13 |
Stable tag: 1.3.0
|
14 |
+
>>>>>>> .r2100840
|
15 |
License: GPLv3 or later
|
16 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
17 |
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
+
= 1.3.2 =
|
81 |
+
* New feature: delay redirection in milliseconds.
|
82 |
+
|
83 |
= 1.3.1 =
|
84 |
* Fixed a bug in legacy browsers: the Pro message keep showing.
|
85 |
|
113 |
* Dev improvements.
|
114 |
|
115 |
= 1.2 =
|
116 |
+
* New feature: add script after the form has been sent successfully.
|
117 |
|
118 |
= 1.0.2 =
|
119 |
* Added full support for form duplication.
|
120 |
+
* New feature: open page in a new tab.
|
121 |
* Added plugin class CF7_Redirect.
|
122 |
|
123 |
= 1.0.0 =
|
wpcf7-redirect.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Contact Form 7 Redirection
|
4 |
* Plugin URI: http://querysol.com
|
5 |
* Description: Contact Form 7 Add-on - Redirect after mail sent.
|
6 |
-
* Version: 1.3.
|
7 |
* Author: Query Solutions
|
8 |
* Author URI: http://querysol.com
|
9 |
* Contributors: querysolutions, yuvalsabar
|
@@ -31,7 +31,7 @@ class WPCF7_Redirect {
|
|
31 |
public function __construct() {
|
32 |
$this->plugin_url = plugin_dir_url( __FILE__ );
|
33 |
$this->plugin_path = plugin_dir_path( __FILE__ );
|
34 |
-
$this->version = '1.3.
|
35 |
$this->add_actions();
|
36 |
}
|
37 |
|
@@ -141,6 +141,10 @@ class WPCF7_Redirect {
|
|
141 |
'name' => 'http_build_query_selectively_fields',
|
142 |
'type' => 'text',
|
143 |
),
|
|
|
|
|
|
|
|
|
144 |
array(
|
145 |
'name' => 'after_sent_script',
|
146 |
'type' => 'textarea',
|
@@ -448,6 +452,13 @@ class WPCF7_Redirect {
|
|
448 |
<input type="text" id="wpcf7-redirect-http-build-query-selectively-fields" class="field-hidden" placeholder="<?php esc_html_e( 'Fields to pass, separated by commas', 'wpcf7-redirect' );?>" name="wpcf7-redirect[http_build_query_selectively_fields]" value="<?php echo $fields['http_build_query_selectively_fields'];?>">
|
449 |
</div>
|
450 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
451 |
<hr />
|
452 |
|
453 |
<div class="field-wrap field-wrap-after-sent-script">
|
3 |
* Plugin Name: Contact Form 7 Redirection
|
4 |
* Plugin URI: http://querysol.com
|
5 |
* Description: Contact Form 7 Add-on - Redirect after mail sent.
|
6 |
+
* Version: 1.3.2
|
7 |
* Author: Query Solutions
|
8 |
* Author URI: http://querysol.com
|
9 |
* Contributors: querysolutions, yuvalsabar
|
31 |
public function __construct() {
|
32 |
$this->plugin_url = plugin_dir_url( __FILE__ );
|
33 |
$this->plugin_path = plugin_dir_path( __FILE__ );
|
34 |
+
$this->version = '1.3.2';
|
35 |
$this->add_actions();
|
36 |
}
|
37 |
|
141 |
'name' => 'http_build_query_selectively_fields',
|
142 |
'type' => 'text',
|
143 |
),
|
144 |
+
array(
|
145 |
+
'name' => 'delay_redirect',
|
146 |
+
'type' => 'number',
|
147 |
+
),
|
148 |
array(
|
149 |
'name' => 'after_sent_script',
|
150 |
'type' => 'textarea',
|
452 |
<input type="text" id="wpcf7-redirect-http-build-query-selectively-fields" class="field-hidden" placeholder="<?php esc_html_e( 'Fields to pass, separated by commas', 'wpcf7-redirect' );?>" name="wpcf7-redirect[http_build_query_selectively_fields]" value="<?php echo $fields['http_build_query_selectively_fields'];?>">
|
453 |
</div>
|
454 |
|
455 |
+
<div class="field-wrap field-wrap-delay-redirect">
|
456 |
+
<label for="wpcf7-redirect-delay-redirect">
|
457 |
+
<?php esc_html_e( 'Delay redirect (in milliseconds)', 'wpcf7-redirect' );?>
|
458 |
+
</label>
|
459 |
+
<input type="number" id="wpcf7-redirect-delay-redirect" name="wpcf7-redirect[delay_redirect]" value="<?php echo $fields['delay_redirect'];?>">
|
460 |
+
</div>
|
461 |
+
|
462 |
<hr />
|
463 |
|
464 |
<div class="field-wrap field-wrap-after-sent-script">
|