| @@ -3,13 +3,13 @@ | ||
| 3 | 3 | /** |
| 4 | 4 | * Plugin Name: Bit Form |
| 5 | 5 | * Plugin URI: https://www.bitapps.pro/bit-form |
| 6 | 6 | * Description: Contact Form Builder Plugin: Multi Step Contact Form, Payment Form, Custom Contact Form Plugin by Bit Form |
| 7 | - * Version: 2.10.1 | |
| 7 | + * Version: 2.15.3 | |
| 8 | 8 | * Author: Contact Form Builder - Bit Form |
| 9 | 9 | * Author URI: https://www.bitapps.pro |
| 10 | 10 | * Text Domain: bit-form |
| 11 | - * Requires PHP: 5.6 | |
| 11 | + * Requires PHP: 7.4 | |
| 12 | 12 | * Domain Path: /languages |
| 13 | 13 | * License: GPLv2 or later |
| 14 | 14 | */ |
| 15 | 15 | |
| @@ -20,50 +20,22 @@ | ||
| 20 | 20 | exit; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | // Define most essential constants. |
| 24 | -define('BITFORMS_VERSION', '2.10.1'); | |
| 24 | +define('BITFORMS_VERSION', '2.15.3'); | |
| 25 | 25 | define('BITFORMS_PLUGIN_MAIN_FILE', __FILE__); |
| 26 | 26 | |
| 27 | 27 | global $bitforms_db_version; |
| 28 | 28 | $bitforms_db_version = '2.3'; |
| 29 | +define('BITFORMS_DB_VERSION', $bitforms_db_version); | |
| 30 | +define('BITFORMS_REQUIRED_WP_VERSION', '5.1'); | |
| 31 | +define('BITFORMS_REQUIRED_PHP_VERSION', '7.4'); | |
| 32 | +define('BITFORMS_API_VERSION', '1.0'); | |
| 29 | 33 | |
| 30 | 34 | if (version_compare(PHP_VERSION, '5.6.0', '>=')) { |
| 31 | - $rootVersionFolder = ''; | |
| 32 | - $olderVersion = get_option('bitforms_version'); | |
| 33 | - $isMigratedToV2 = get_option('bitforms_migrated_to_v2'); | |
| 34 | - $isMigratingToV2 = get_option('bitforms_migrating_to_v2'); | |
| 35 | - | |
| 36 | - if (!$isMigratingToV2 && !$isMigratedToV2) { | |
| 37 | - global $wpdb; | |
| 38 | - $oldForms = []; | |
| 39 | - if ($olderVersion) { | |
| 40 | - $oldForms = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}bitforms_form"); | |
| 41 | - } | |
| 42 | - if (count($oldForms) > 0) { | |
| 43 | - $rootVersionFolder = 'v1/'; | |
| 44 | - } else { | |
| 45 | - update_option('bitforms_migrated_to_v2', true); | |
| 46 | - } | |
| 47 | - } | |
| 48 | - require_once plugin_dir_path(__FILE__) . $rootVersionFolder . 'includes/loader.php'; | |
| 35 | + require_once plugin_dir_path(__FILE__) . 'includes/loader.php'; | |
| 49 | 36 | } |
| 50 | 37 | |
| 51 | -function bitform_version_migration_notice() | |
| 52 | -{ | |
| 53 | - $olderVersion = get_option('bitforms_version'); | |
| 54 | - $isMigratedToV2 = get_option('bitforms_migrated_to_v2'); | |
| 55 | - if (!$isMigratedToV2 && $olderVersion) { | |
| 56 | - $migrationUrl = admin_url('admin.php?page=bitform'); | |
| 57 | - $migrationNotice = sprintf( | |
| 58 | - esc_html__('Your Bit Form plugin has not been migrated to the latest version (V2). We will cease support for V1 on 01/03/2024 and automatically migrate V1 forms to V2. Please %s to migrate manually. Alternatively, you can disable automatic updates for Bit Form to prevent the automatic migration of Bit Form forms.', 'bit-form'), | |
| 59 | - '<a href="' . $migrationUrl . '">' . esc_html__('click here', 'bit-form') . '</a>' | |
| 60 | - ); | |
| 61 | - echo '<div class="notice notice-warning is-dismissible"><p>' . $migrationNotice . '</p></div>'; | |
| 62 | - } | |
| 63 | -} | |
| 64 | - | |
| 65 | -add_action('admin_notices', 'bitform_version_migration_notice'); | |
| 66 | 38 | /** |
| 67 | 39 | * Handles plugin activation. |
| 68 | 40 | * |
| 69 | 41 | * Throws an error if the plugin is activated on an older version than PHP 5.6. |
| @@ -71,10 +43,10 @@ | ||
| 71 | 43 | function bitforms_activate_plugin($network_wide) |
| 72 | 44 | { |
| 73 | 45 | if (version_compare(PHP_VERSION, '5.6.0', '<')) { |
| 74 | 46 | wp_die( |
| 75 | - esc_html__('bitforms requires PHP version 5.6.', 'bit-form'), | |
| 76 | - esc_html__('Error Activating', 'bit-form') | |
| 47 | + esc_html_e('bitforms requires PHP version 5.6.', 'bit-form'), | |
| 48 | + esc_html_e('Error Activating', 'bit-form') | |
| 77 | 49 | ); |
| 78 | 50 | } |
| 79 | 51 | |
| 80 | 52 | do_action('bitforms_activation', $network_wide); |