Contact Form 7 – Success Page Redirects - Version 1.1.4

Version Description

  • Upgrade process for verifying that Contact Form 7 is installed and up to date.
Download this release

Release Info

Developer rnevius
Plugin Icon 128x128 Contact Form 7 – Success Page Redirects
Version 1.1.4
Comparing to
See all releases

Code changes from version 1.1.3 to 1.1.4

Files changed (2) hide show
  1. cf7-success-page-redirects.php +6 -1
  2. readme.txt +3 -0
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.3
6
  * Author: Ryan Nevius
7
  * Author URI: http://www.ryannevius.com
8
  * License: GPLv3
@@ -17,6 +17,11 @@ function cf7_success_page_admin_notice() {
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>';
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.4
6
  * Author: Ryan Nevius
7
  * Author URI: http://www.ryannevius.com
8
  * License: GPLv3
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
+ // CF7 drops the ending ".0" for new major releases (e.g. Version 4.0 instead of 4.0.0...which would make the above version "40")
21
+ // We need to make sure this value has a digit in the 100s place.
22
+ if ( $wpcf7_version < 100 ) {
23
+ $wpcf7_version = $wpcf7_version * 10;
24
+ }
25
  // If CF7 version is < 3.9.0
26
  if ( $wpcf7_version < 390 ) {
27
  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>';
readme.txt CHANGED
@@ -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.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
 
48
 
49
  == Changelog ==
50
 
51
+ = 1.1.4 =
52
+ * Upgrade process for verifying that Contact Form 7 is installed and up to date.
53
+
54
  = 1.1.3 =
55
  * CF7 id property is no longer accessible. Switched to the id() method, so that form changes can be properly saved in the admin.
56