| @@ -1,14 +1,15 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * Plugin Name: Bit Form |
| 5 | - * Plugin URI: bitpress.pro | |
| 6 | - * Description: Wordpress form builder plugin | |
| 7 | - * Version: 1.2 | |
| 8 | - * Author: BitPress | |
| 9 | - * Author URI: https://www.bitpress.pro | |
| 10 | - * Text Domain: bitform | |
| 5 | + * Plugin URI: https://www.bitapps.pro/bit-form | |
| 6 | + * Description: Contact Form Builder Plugin: Multi Step Contact Form, Payment Form, Custom Contact Form Plugin by Bit Form | |
| 7 | + * Version: 2.16.2 | |
| 8 | + * Author: Contact Form Builder - Bit Form | |
| 9 | + * Author URI: https://www.bitapps.pro | |
| 10 | + * Text Domain: bit-form | |
| 11 | + * Requires PHP: 7.4 | |
| 11 | 12 | * Domain Path: /languages |
| 12 | 13 | * License: GPLv2 or later |
| 13 | 14 | */ |
| 14 | 15 | |
| @@ -15,34 +16,41 @@ | ||
| 15 | 16 | /*** |
| 16 | 17 | * If try to direct access plugin folder it will Exit |
| 17 | 18 | **/ |
| 18 | 19 | if (!defined('ABSPATH')) { |
| 19 | - exit; | |
| 20 | + exit; | |
| 20 | 21 | } |
| 21 | 22 | |
| 22 | - | |
| 23 | 23 | // Define most essential constants. |
| 24 | -define('BITFORMS_VERSION', '1.2'); | |
| 24 | +define('BITFORMS_VERSION', '2.16.2'); | |
| 25 | 25 | define('BITFORMS_PLUGIN_MAIN_FILE', __FILE__); |
| 26 | 26 | |
| 27 | 27 | global $bitforms_db_version; |
| 28 | -$bitforms_db_version = '1.2'; | |
| 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 | |
| 34 | +if (version_compare(PHP_VERSION, '5.6.0', '>=')) { | |
| 35 | + require_once plugin_dir_path(__FILE__) . 'includes/loader.php'; | |
| 36 | +} | |
| 37 | + | |
| 30 | 38 | /** |
| 31 | 39 | * Handles plugin activation. |
| 32 | 40 | * |
| 33 | - * Throws an error if the plugin is activated on an older version than PHP 5.4. | |
| 41 | + * Throws an error if the plugin is activated on an older version than PHP 5.6. | |
| 34 | 42 | */ |
| 35 | 43 | function bitforms_activate_plugin($network_wide) |
| 36 | 44 | { |
| 37 | - if (version_compare(PHP_VERSION, '5.4.0', '<')) { | |
| 38 | - wp_die( | |
| 39 | - esc_html__('bitforms requires PHP version 5.4.', 'bitform'), | |
| 40 | - esc_html__('Error Activating', 'bitform') | |
| 41 | - ); | |
| 42 | - } | |
| 45 | + if (version_compare(PHP_VERSION, '5.6.0', '<')) { | |
| 46 | + wp_die( | |
| 47 | + esc_html_e('bitforms requires PHP version 5.6.', 'bit-form'), | |
| 48 | + esc_html_e('Error Activating', 'bit-form') | |
| 49 | + ); | |
| 50 | + } | |
| 43 | 51 | |
| 44 | - do_action('bitforms_activation', $network_wide); | |
| 52 | + do_action('bitforms_activation', $network_wide); | |
| 45 | 53 | } |
| 46 | 54 | |
| 47 | 55 | register_activation_hook(__FILE__, 'bitforms_activate_plugin'); |
| 48 | 56 | |
| @@ -50,13 +58,13 @@ | ||
| 50 | 58 | * Handles plugin deactivation. |
| 51 | 59 | */ |
| 52 | 60 | function bitforms_deactivate_plugin($network_wide) |
| 53 | 61 | { |
| 54 | - if (version_compare(PHP_VERSION, '5.4.0', '<')) { | |
| 55 | - return; | |
| 56 | - } | |
| 62 | + if (version_compare(PHP_VERSION, '5.6.0', '<')) { | |
| 63 | + return; | |
| 64 | + } | |
| 57 | 65 | |
| 58 | - do_action('bitforms_deactivation', $network_wide); | |
| 66 | + do_action('bitforms_deactivation', $network_wide); | |
| 59 | 67 | } |
| 60 | 68 | |
| 61 | 69 | register_deactivation_hook(__FILE__, 'bitforms_deactivate_plugin'); |
| 62 | 70 | |
| @@ -66,40 +74,11 @@ | ||
| 66 | 74 | * @access private |
| 67 | 75 | */ |
| 68 | 76 | function bitforms_uninstall_plugin() |
| 69 | 77 | { |
| 70 | - if (version_compare(PHP_VERSION, '5.6.0', '<')) { | |
| 71 | - return; | |
| 72 | - } | |
| 78 | + if (version_compare(PHP_VERSION, '5.6.0', '<')) { | |
| 79 | + return; | |
| 80 | + } | |
| 73 | 81 | |
| 74 | - do_action('bitforms_uninstall'); | |
| 82 | + do_action('bitforms_uninstall'); | |
| 75 | 83 | } |
| 76 | 84 | register_uninstall_hook(__FILE__, 'bitforms_uninstall_plugin'); |
| 77 | - | |
| 78 | -if (version_compare(PHP_VERSION, '5.6.0', '>=')) { | |
| 79 | - require_once plugin_dir_path(__FILE__) . 'includes/loader.php'; | |
| 80 | -} | |
| 81 | -function bitform_delete_plugin_database_tables() | |
| 82 | -{ | |
| 83 | - global $wpdb; | |
| 84 | - $tableArray = [ | |
| 85 | - $wpdb->prefix . "bitforms_email_template", | |
| 86 | - $wpdb->prefix . "bitforms_form", | |
| 87 | - $wpdb->prefix . "bitforms_form_entries", | |
| 88 | - $wpdb->prefix . "bitforms_form_entrymeta", | |
| 89 | - $wpdb->prefix . "bitforms_form_entry_log", | |
| 90 | - $wpdb->prefix . "bitforms_form_entry_relatedinfo", | |
| 91 | - $wpdb->prefix . "bitforms_form_log_details", | |
| 92 | - $wpdb->prefix . "bitforms_integration", | |
| 93 | - $wpdb->prefix . "bitforms_reports", | |
| 94 | - $wpdb->prefix . "bitforms_success_messages", | |
| 95 | - $wpdb->prefix . "bitforms_workflows", | |
| 96 | - | |
| 97 | - ]; | |
| 98 | - | |
| 99 | - foreach ($tableArray as $tablename) { | |
| 100 | - $wpdb->query("DROP TABLE IF EXISTS $tablename"); | |
| 101 | - } | |
| 102 | - $wpdb->query("DELETE FROM `{$wpdb->prefix}options` WHERE option_name LIKE '%bitforms%'"); | |
| 103 | -} | |
| 104 | - | |
| 105 | -register_uninstall_hook(__FILE__, 'bitform_delete_plugin_database_tables'); | |