Version Description
- Provides clearer admin notices regarding necessary plugin dependencies
Download this release
Release Info
Developer | rnevius |
Plugin | Contact Form 7 – Success Page Redirects |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
- cf7-success-page-redirects.php +17 -7
- readme.txt +12 -0
cf7-success-page-redirects.php
CHANGED
@@ -2,26 +2,36 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Contact Form 7 - Success Page Redirects
|
4 |
* Description: An add-on for Contact Form 7 that provides a straightforward method to redirect visitors to success pages or thank you pages.
|
5 |
-
* Version: 1.1.
|
6 |
* Author: Ryan Nevius
|
7 |
* Author URI: http://www.ryannevius.com
|
8 |
* License: GPLv3
|
9 |
*/
|
|
|
10 |
/**
|
11 |
-
* Verify
|
12 |
*/
|
13 |
function cf7_success_page_admin_notice() {
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
echo '<div class="error"><p>Contact Form 7 is not activated. The Contact Form 7 Plugin must be installed and activated before you can use Success Page Redirects.</p></div>';
|
16 |
}
|
17 |
-
// if ( (int)preg_replace('/[.]/', '', get_plugin_data( plugins_url() . '/contact-form-7/wp-contact-form-7.php', false, false)['Version']) < 394 ) {
|
18 |
-
// echo '<div class="error"><p><strong>Warning: </strong>Contact Form 7 - Success Page Redirects requires that you have the latest version of Contact Form 7 installed. Please upgrade now.</p></div>';
|
19 |
-
// }
|
20 |
}
|
21 |
add_action( 'admin_notices', 'cf7_success_page_admin_notice' );
|
22 |
|
|
|
23 |
/**
|
24 |
-
* Disable
|
25 |
*/
|
26 |
add_filter( 'wpcf7_load_js', '__return_false' );
|
27 |
|
2 |
/**
|
3 |
* Plugin Name: Contact Form 7 - Success Page Redirects
|
4 |
* Description: An add-on for Contact Form 7 that provides a straightforward method to redirect visitors to success pages or thank you pages.
|
5 |
+
* Version: 1.1.2
|
6 |
* Author: Ryan Nevius
|
7 |
* Author URI: http://www.ryannevius.com
|
8 |
* License: GPLv3
|
9 |
*/
|
10 |
+
|
11 |
/**
|
12 |
+
* Verify CF7 dependencies.
|
13 |
*/
|
14 |
function cf7_success_page_admin_notice() {
|
15 |
+
// Verify that CF7 is active and updated to the required version (currently 3.9.0)
|
16 |
+
if ( is_plugin_active('contact-form-7/wp-contact-form-7.php') ) {
|
17 |
+
$wpcf7_path = plugin_dir_path( dirname(__FILE__) ) . 'contact-form-7/wp-contact-form-7.php';
|
18 |
+
$wpcf7_plugin_data = get_plugin_data( $wpcf7_path, false, false);
|
19 |
+
$wpcf7_version = (int)preg_replace('/[.]/', '', $wpcf7_plugin_data['Version']);
|
20 |
+
// If CF7 version is < 3.9.0
|
21 |
+
if ( $wpcf7_version < 390 ) {
|
22 |
+
echo '<div class="error"><p><strong>Warning: </strong>Contact Form 7 - Success Page Redirects requires that you have the latest version of Contact Form 7 installed. Please upgrade now.</p></div>';
|
23 |
+
}
|
24 |
+
}
|
25 |
+
// If it's not installed and activated, throw an error
|
26 |
+
else {
|
27 |
echo '<div class="error"><p>Contact Form 7 is not activated. The Contact Form 7 Plugin must be installed and activated before you can use Success Page Redirects.</p></div>';
|
28 |
}
|
|
|
|
|
|
|
29 |
}
|
30 |
add_action( 'admin_notices', 'cf7_success_page_admin_notice' );
|
31 |
|
32 |
+
|
33 |
/**
|
34 |
+
* Disable Contact Form 7 JavaScript completely
|
35 |
*/
|
36 |
add_filter( 'wpcf7_load_js', '__return_false' );
|
37 |
|
readme.txt
CHANGED
@@ -9,12 +9,14 @@ License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
|
9 |
|
10 |
An add-on for Contact Form 7 that provides a straightforward method to redirect visitors to success pages or thank you pages.
|
11 |
|
|
|
12 |
== Description ==
|
13 |
|
14 |
An add-on for Contact Form 7 (CF7) that provides a straightforward method to redirect visitors to success pages or thank you pages, if their messages are successfully delivered. If no message is sent, or if there is an error with the form, the user will not be redirected.
|
15 |
|
16 |
**NOTE:** This plugin requires Contact Form 7 version 3.9 or later.
|
17 |
|
|
|
18 |
== Installation ==
|
19 |
|
20 |
1. Unzip the downloaded plugin archive.
|
@@ -23,12 +25,17 @@ An add-on for Contact Form 7 (CF7) that provides a straightforward method to red
|
|
23 |
|
24 |
Please note that [Contact Form 7](https://wordpress.org/plugins/contact-form-7/) (version 3.9 or later) must be installed and activated in order for this plugin to be functional.
|
25 |
|
|
|
26 |
== Frequently Asked Questions ==
|
27 |
|
28 |
= Why doesn't this plugin do *insert feature here*? =
|
29 |
|
30 |
If you have a feature suggestion, I'd love to hear about it. Feel free to leave a message on the "Support" tab of the plugin page, and I'll follow up as soon as possible.
|
31 |
|
|
|
|
|
|
|
|
|
32 |
= Why are my forms no longer using Ajax, when I install this plugin? =
|
33 |
|
34 |
In order to ensure that all forms are submitted properly, and that users can be redirected to success pages from some of your forms, I have had to disable Contact Form 7's JavaScript for all forms. This means that you won't be able to use Ajax to submit forms. In future updates, I hope to change this functionality, so that Ajax is only disabled for the forms that have a redirect page defined. Please note that disabling CF7's JavaScript does not affect your forms' ability to send messages properly.
|
@@ -38,8 +45,12 @@ In order to ensure that all forms are submitted properly, and that users can be
|
|
38 |
|
39 |
1. The plugin will add a "Redirect to:" dropdown that contains all of your existing pages as options. This is set on each of the "Edit Contact Form" pages.
|
40 |
|
|
|
41 |
== Changelog ==
|
42 |
|
|
|
|
|
|
|
43 |
= 1.1.1 =
|
44 |
* Fixes an issue that prevented some forms from submitting and redirecting
|
45 |
* Disables JavaScript for WPCF7 completely
|
@@ -47,6 +58,7 @@ In order to ensure that all forms are submitted properly, and that users can be
|
|
47 |
= 1.1.0 =
|
48 |
* Initial version
|
49 |
|
|
|
50 |
== Upgrade Notice ==
|
51 |
|
52 |
= 1.1.1 =
|
9 |
|
10 |
An add-on for Contact Form 7 that provides a straightforward method to redirect visitors to success pages or thank you pages.
|
11 |
|
12 |
+
|
13 |
== Description ==
|
14 |
|
15 |
An add-on for Contact Form 7 (CF7) that provides a straightforward method to redirect visitors to success pages or thank you pages, if their messages are successfully delivered. If no message is sent, or if there is an error with the form, the user will not be redirected.
|
16 |
|
17 |
**NOTE:** This plugin requires Contact Form 7 version 3.9 or later.
|
18 |
|
19 |
+
|
20 |
== Installation ==
|
21 |
|
22 |
1. Unzip the downloaded plugin archive.
|
25 |
|
26 |
Please note that [Contact Form 7](https://wordpress.org/plugins/contact-form-7/) (version 3.9 or later) must be installed and activated in order for this plugin to be functional.
|
27 |
|
28 |
+
|
29 |
== Frequently Asked Questions ==
|
30 |
|
31 |
= Why doesn't this plugin do *insert feature here*? =
|
32 |
|
33 |
If you have a feature suggestion, I'd love to hear about it. Feel free to leave a message on the "Support" tab of the plugin page, and I'll follow up as soon as possible.
|
34 |
|
35 |
+
= My forms are no longer submitting, with this plugin installed. Why? =
|
36 |
+
|
37 |
+
Please make sure that you have updated to the latest version of Contact Form 7. Success Page Redirects only supports versions 3.9.0 or higher. If everything is up to date and you're still experiencing problems, please post a message on the [Support Page](https://wordpress.org/support/plugin/contact-form-7-success-page-redirects).
|
38 |
+
|
39 |
= Why are my forms no longer using Ajax, when I install this plugin? =
|
40 |
|
41 |
In order to ensure that all forms are submitted properly, and that users can be redirected to success pages from some of your forms, I have had to disable Contact Form 7's JavaScript for all forms. This means that you won't be able to use Ajax to submit forms. In future updates, I hope to change this functionality, so that Ajax is only disabled for the forms that have a redirect page defined. Please note that disabling CF7's JavaScript does not affect your forms' ability to send messages properly.
|
45 |
|
46 |
1. The plugin will add a "Redirect to:" dropdown that contains all of your existing pages as options. This is set on each of the "Edit Contact Form" pages.
|
47 |
|
48 |
+
|
49 |
== Changelog ==
|
50 |
|
51 |
+
= 1.1.2 =
|
52 |
+
* Provides clearer admin notices regarding necessary plugin dependencies
|
53 |
+
|
54 |
= 1.1.1 =
|
55 |
* Fixes an issue that prevented some forms from submitting and redirecting
|
56 |
* Disables JavaScript for WPCF7 completely
|
58 |
= 1.1.0 =
|
59 |
* Initial version
|
60 |
|
61 |
+
|
62 |
== Upgrade Notice ==
|
63 |
|
64 |
= 1.1.1 =
|