Version Description
- CF7 id property is no longer accessible. Switched to the id() method, so that form changes can be properly saved in the admin.
Download this release
Release Info
Developer | rnevius |
Plugin | Contact Form 7 – Success Page Redirects |
Version | 1.1.3 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.1.3
- cf7-success-page-redirects.php +7 -7
- readme.txt +6 -3
cf7-success-page-redirects.php
CHANGED
@@ -2,7 +2,7 @@
|
|
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
|
@@ -62,8 +62,8 @@ function cf7_success_page_metaboxes( $post ) {
|
|
62 |
}
|
63 |
|
64 |
// Store Success Page Info
|
65 |
-
function cf7_success_page_save_contact_form( $
|
66 |
-
$
|
67 |
|
68 |
if ( !isset( $_POST ) || empty( $_POST ) || !isset( $_POST['cf7-redirect-page-id'] ) ) {
|
69 |
return;
|
@@ -74,7 +74,7 @@ function cf7_success_page_save_contact_form( $cf7 ) {
|
|
74 |
return;
|
75 |
}
|
76 |
// Update the stored value
|
77 |
-
update_post_meta( $
|
78 |
}
|
79 |
}
|
80 |
add_action( 'wpcf7_save_contact_form', 'cf7_success_page_save_contact_form' );
|
@@ -83,11 +83,11 @@ add_action( 'wpcf7_save_contact_form', 'cf7_success_page_save_contact_form' );
|
|
83 |
/**
|
84 |
* Redirect the user, after a successful email is sent
|
85 |
*/
|
86 |
-
function cf7_success_page_form_submitted( $
|
87 |
-
$
|
88 |
|
89 |
// Send us to a success page, if there is one
|
90 |
-
$success_page = get_post_meta( $
|
91 |
if ( !empty($success_page) ) {
|
92 |
wp_redirect( get_permalink( $success_page ) );
|
93 |
die();
|
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.3
|
6 |
* Author: Ryan Nevius
|
7 |
* Author URI: http://www.ryannevius.com
|
8 |
* License: GPLv3
|
62 |
}
|
63 |
|
64 |
// Store Success Page Info
|
65 |
+
function cf7_success_page_save_contact_form( $contact_form ) {
|
66 |
+
$contact_form_id = $contact_form->id();
|
67 |
|
68 |
if ( !isset( $_POST ) || empty( $_POST ) || !isset( $_POST['cf7-redirect-page-id'] ) ) {
|
69 |
return;
|
74 |
return;
|
75 |
}
|
76 |
// Update the stored value
|
77 |
+
update_post_meta( $contact_form_id, '_cf7_success_page_key', $_POST['cf7-redirect-page-id'] );
|
78 |
}
|
79 |
}
|
80 |
add_action( 'wpcf7_save_contact_form', 'cf7_success_page_save_contact_form' );
|
83 |
/**
|
84 |
* Redirect the user, after a successful email is sent
|
85 |
*/
|
86 |
+
function cf7_success_page_form_submitted( $contact_form ) {
|
87 |
+
$contact_form_id = $contact_form->id();
|
88 |
|
89 |
// Send us to a success page, if there is one
|
90 |
+
$success_page = get_post_meta( $contact_form_id, '_cf7_success_page_key', true );
|
91 |
if ( !empty($success_page) ) {
|
92 |
wp_redirect( get_permalink( $success_page ) );
|
93 |
die();
|
readme.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
=== Contact Form 7 - Success Page Redirects ===
|
2 |
Contributors: rnevius
|
3 |
-
Tags: contact form 7, cf7, contact form, redirect, forms, form redirect, form, success pages, thank you pages, contact form 7 add-on, cf7 redirect, cf7 success, contact form 7 redirect, contact form 7 success
|
4 |
Requires at least: 3.8.2
|
5 |
Tested up to: 4.0
|
6 |
Stable tag: trunk
|
@@ -20,8 +20,8 @@ An add-on for Contact Form 7 (CF7) that provides a straightforward method to red
|
|
20 |
== Installation ==
|
21 |
|
22 |
1. Unzip the downloaded plugin archive.
|
23 |
-
|
24 |
-
|
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 |
|
@@ -48,6 +48,9 @@ In order to ensure that all forms are submitted properly, and that users can be
|
|
48 |
|
49 |
== Changelog ==
|
50 |
|
|
|
|
|
|
|
51 |
= 1.1.2 =
|
52 |
* Provides clearer admin notices regarding necessary plugin dependencies
|
53 |
|
1 |
=== Contact Form 7 - Success Page Redirects ===
|
2 |
Contributors: rnevius
|
3 |
+
Tags: contact form 7, cf7, contact forms 7, contact form, redirect, forms, form redirect, form, success pages, thank you pages, contact form 7 add-on, cf7 redirect, cf7 success, contact form 7 redirect, contact form 7 success
|
4 |
Requires at least: 3.8.2
|
5 |
Tested up to: 4.0
|
6 |
Stable tag: trunk
|
20 |
== Installation ==
|
21 |
|
22 |
1. Unzip the downloaded plugin archive.
|
23 |
+
2. Upload the inner 'contact-form-7-success-page-redirects' directory to the '/wp-content/plugins/' directory on your web server.
|
24 |
+
3. Activate the plugin through the 'Plugins' menu in WordPress.
|
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 |
|
48 |
|
49 |
== Changelog ==
|
50 |
|
51 |
+
= 1.1.3 =
|
52 |
+
* CF7 id property is no longer accessible. Switched to the id() method, so that form changes can be properly saved in the admin.
|
53 |
+
|
54 |
= 1.1.2 =
|
55 |
* Provides clearer admin notices regarding necessary plugin dependencies
|
56 |
|