| @@ -2,11 +2,11 @@ | ||
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * Plugin Name: Bit Form |
| 5 | 5 | * Plugin URI: https://www.bitapps.pro/bit-form |
| 6 | - * Description: Wordpress form builder plugin | |
| 7 | - * Version: 2.0 | |
| 8 | - * Author: Bit Apps | |
| 6 | + * Description: Contact Form Builder: Multi Step Contact form, Payment form, WPForm Calculator form, Registration Form & WP Forms with form integrations | |
| 7 | + * Version: 2.9.1 | |
| 8 | + * Author: Contact Form Builder Plugin - WPForm by Bit Form | |
| 9 | 9 | * Author URI: https://www.bitapps.pro |
| 10 | 10 | * Text Domain: bit-form |
| 11 | 11 | * Requires PHP: 5.6 |
| 12 | 12 | * Domain Path: /languages |
| @@ -20,19 +20,25 @@ | ||
| 20 | 20 | exit; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | // Define most essential constants. |
| 24 | -define('BITFORMS_VERSION', '2.0'); | |
| 24 | +define('BITFORMS_VERSION', '2.9.1'); | |
| 25 | 25 | define('BITFORMS_PLUGIN_MAIN_FILE', __FILE__); |
| 26 | 26 | |
| 27 | 27 | global $bitforms_db_version; |
| 28 | -$bitforms_db_version = '2.2'; | |
| 28 | +$bitforms_db_version = '2.3'; | |
| 29 | 29 | |
| 30 | 30 | if (version_compare(PHP_VERSION, '5.6.0', '>=')) { |
| 31 | 31 | $rootVersionFolder = ''; |
| 32 | + $olderVersion = get_option('bitforms_version'); | |
| 33 | + if ('2.0-beta.1' === $olderVersion) { | |
| 34 | + update_option('bitforms_migrated_to_v2', true); | |
| 35 | + update_option('bitforms_migrating_to_v2', false); | |
| 36 | + } | |
| 32 | 37 | $isMigratedToV2 = get_option('bitforms_migrated_to_v2'); |
| 33 | - $isMigratingToV2 = get_option('bitforms_migrating_to_v2'); | |
| 34 | - if (!$isMigratingToV2 && !$isMigratedToV2) { | |
| 38 | + $isMigratingToV2 = get_option('bitforms_migrating_to_v2', null); | |
| 39 | + | |
| 40 | + if (null !== $isMigratingToV2 && !$isMigratingToV2 && !$isMigratedToV2) { | |
| 35 | 41 | global $wpdb; |
| 36 | 42 | $oldForms = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}bitforms_form"); |
| 37 | 43 | if (count($oldForms) > 0) { |
| 38 | 44 | $rootVersionFolder = 'v1/'; |
| @@ -46,9 +52,10 @@ | ||
| 46 | 52 | * Handles plugin activation. |
| 47 | 53 | * |
| 48 | 54 | * Throws an error if the plugin is activated on an older version than PHP 5.6. |
| 49 | 55 | */ |
| 50 | -function bitforms_activate_plugin($network_wide) { | |
| 56 | +function bitforms_activate_plugin($network_wide) | |
| 57 | +{ | |
| 51 | 58 | if (version_compare(PHP_VERSION, '5.6.0', '<')) { |
| 52 | 59 | wp_die( |
| 53 | 60 | esc_html__('bitforms requires PHP version 5.6.', 'bit-form'), |
| 54 | 61 | esc_html__('Error Activating', 'bit-form') |
| @@ -62,9 +69,10 @@ | ||
| 62 | 69 | |
| 63 | 70 | /** |
| 64 | 71 | * Handles plugin deactivation. |
| 65 | 72 | */ |
| 66 | -function bitforms_deactivate_plugin($network_wide) { | |
| 73 | +function bitforms_deactivate_plugin($network_wide) | |
| 74 | +{ | |
| 67 | 75 | if (version_compare(PHP_VERSION, '5.6.0', '<')) { |
| 68 | 76 | return; |
| 69 | 77 | } |
| 70 | 78 | |
| @@ -77,9 +85,10 @@ | ||
| 77 | 85 | * Handles plugin uninstall. |
| 78 | 86 | * |
| 79 | 87 | * @access private |
| 80 | 88 | */ |
| 81 | -function bitforms_uninstall_plugin() { | |
| 89 | +function bitforms_uninstall_plugin() | |
| 90 | +{ | |
| 82 | 91 | if (version_compare(PHP_VERSION, '5.6.0', '<')) { |
| 83 | 92 | return; |
| 84 | 93 | } |
| 85 | 94 | |