Version Description
- Make sure to check for existence of legacy table before trying to read from it.
Download this release
Release Info
Developer | tlovett1 |
Plugin | Custom Contact Forms |
Version | 6.1.1 |
Comparing to | |
See all releases |
Code changes from version 6.1 to 6.1.1
- classes/class-ccf-upgrader.php +27 -14
- custom-contact-forms.php +1 -1
- readme.txt +4 -1
classes/class-ccf-upgrader.php
CHANGED
@@ -23,20 +23,28 @@ class CCF_Upgrader {
|
|
23 |
$upgraded_forms = get_option( 'ccf_upgraded_forms', null );
|
24 |
|
25 |
if ( null === $upgraded_forms ) {
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
$
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
<
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
}
|
42 |
}
|
@@ -56,6 +64,11 @@ class CCF_Upgrader {
|
|
56 |
<?php
|
57 |
}
|
58 |
|
|
|
|
|
|
|
|
|
|
|
59 |
public function upgrade() {
|
60 |
global $wpdb;
|
61 |
|
23 |
$upgraded_forms = get_option( 'ccf_upgraded_forms', null );
|
24 |
|
25 |
if ( null === $upgraded_forms ) {
|
26 |
+
|
27 |
+
if ( $wpdb->get_var( "SHOW TABLES LIKE '{$wpdb->prefix}customcontactforms_forms'" ) === $wpdb->prefix . 'customcontactforms_forms' ) {
|
28 |
+
|
29 |
+
$forms = $wpdb->get_results( "SELECT * FROM {$wpdb->prefix}customcontactforms_forms" );
|
30 |
+
|
31 |
+
if ( ! empty( $forms ) ) {
|
32 |
+
$nonce = wp_create_nonce( 'ccf_upgrade' );
|
33 |
+
|
34 |
+
?>
|
35 |
+
<div class="update-nag">
|
36 |
+
<p>
|
37 |
+
<?php esc_html_e( 'Did you just upgrade to a post 6.0 version of Custom Contact Forms? If so, you might need to upgrade your database to use your old forms.', 'custom-contact-forms' ); ?>
|
38 |
+
<a href="<?php echo esc_url( admin_url( '?ccf_upgrade=1&nonce=' . $nonce ) ); ?>" class="button"><?php esc_html_e( 'Upgrade', 'custom-contact-forms' ); ?></a>
|
39 |
+
<a href="<?php echo esc_url( admin_url( '?ccf_upgrade=0&nonce=' . $nonce ) ); ?>" class="button"><?php esc_html_e( 'Dismiss', 'custom-contact-forms' ); ?></a>
|
40 |
+
</p>
|
41 |
+
</div>
|
42 |
+
<?php
|
43 |
+
} else {
|
44 |
+
update_option( 'ccf_upgraded_forms', array() );
|
45 |
+
}
|
46 |
+
} else {
|
47 |
+
update_option( 'ccf_upgraded_forms', array() );
|
48 |
}
|
49 |
}
|
50 |
}
|
64 |
<?php
|
65 |
}
|
66 |
|
67 |
+
/**
|
68 |
+
* Upgrade from old plugin version to 6.0+
|
69 |
+
*
|
70 |
+
* @since 6.0
|
71 |
+
*/
|
72 |
public function upgrade() {
|
73 |
global $wpdb;
|
74 |
|
custom-contact-forms.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: http://www.taylorlovett.com
|
5 |
* Description: Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
|
6 |
* Author: Taylor Lovett
|
7 |
-
* Version: 6.1
|
8 |
* Author URI: http://www.taylorlovett.com
|
9 |
*/
|
10 |
|
4 |
* Plugin URI: http://www.taylorlovett.com
|
5 |
* Description: Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
|
6 |
* Author: Taylor Lovett
|
7 |
+
* Version: 6.1.1
|
8 |
* Author URI: http://www.taylorlovett.com
|
9 |
*/
|
10 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.taylorlovett.com
|
|
4 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers, forms
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 6.1
|
8 |
|
9 |
Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
|
10 |
|
@@ -33,6 +33,9 @@ For questions, feature requests, and support concerning the Custom Contact Forms
|
|
33 |
|
34 |
= Changelog ==
|
35 |
|
|
|
|
|
|
|
36 |
= 6.1.0 =
|
37 |
* Pre-6.0 upgrader added
|
38 |
|
4 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers, forms
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.1
|
7 |
+
Stable tag: 6.1.1
|
8 |
|
9 |
Build beautiful custom forms the WordPress way. View live previews of your forms while you build them.
|
10 |
|
33 |
|
34 |
= Changelog ==
|
35 |
|
36 |
+
= 6.1.1 =
|
37 |
+
* Make sure to check for existence of legacy table before trying to read from it.
|
38 |
+
|
39 |
= 6.1.0 =
|
40 |
* Pre-6.0 upgrader added
|
41 |
|