PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.9.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.9.2
V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 2.10.2 All 137 releases
bit-form / bitforms.php

bitforms.php in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 2.9.2, at bitforms.php

101 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Plugin Name: Bit Form
5 * Plugin URI: https://www.bitapps.pro/bit-form
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.2
8 * Author: Contact Form Builder Plugin - WPForm by Bit Form
9 * Author URI: https://www.bitapps.pro
10 * Text Domain: bit-form
11 * Requires PHP: 5.6
12 * Domain Path: /languages
13 * License: GPLv2 or later
14 */
15
16 /***
17 * If try to direct access plugin folder it will Exit
18 **/
19 if (!defined('ABSPATH')) {
20 exit;
21 }
22
23 // Define most essential constants.
24 define('BITFORMS_VERSION', '2.9.2');
25 define('BITFORMS_PLUGIN_MAIN_FILE', __FILE__);
26
27 global $bitforms_db_version;
28 $bitforms_db_version = '2.3';
29
30 if (version_compare(PHP_VERSION, '5.6.0', '>=')) {
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 }
37 $isMigratedToV2 = get_option('bitforms_migrated_to_v2');
38 $isMigratingToV2 = get_option('bitforms_migrating_to_v2');
39
40 if (!$isMigratingToV2 && !$isMigratedToV2) {
41 global $wpdb;
42 $oldForms = [];
43 if ($olderVersion) {
44 $oldForms = $wpdb->get_results("SELECT * FROM {$wpdb->prefix}bitforms_form");
45 }
46 if (count($oldForms) > 0) {
47 $rootVersionFolder = 'v1/';
48 } else {
49 update_option('bitforms_migrated_to_v2', true);
50 }
51 }
52 require_once plugin_dir_path(__FILE__) . $rootVersionFolder . 'includes/loader.php';
53 }
54 /**
55 * Handles plugin activation.
56 *
57 * Throws an error if the plugin is activated on an older version than PHP 5.6.
58 */
59 function bitforms_activate_plugin($network_wide)
60 {
61 if (version_compare(PHP_VERSION, '5.6.0', '<')) {
62 wp_die(
63 esc_html__('bitforms requires PHP version 5.6.', 'bit-form'),
64 esc_html__('Error Activating', 'bit-form')
65 );
66 }
67
68 do_action('bitforms_activation', $network_wide);
69 }
70
71 register_activation_hook(__FILE__, 'bitforms_activate_plugin');
72
73 /**
74 * Handles plugin deactivation.
75 */
76 function bitforms_deactivate_plugin($network_wide)
77 {
78 if (version_compare(PHP_VERSION, '5.6.0', '<')) {
79 return;
80 }
81
82 do_action('bitforms_deactivation', $network_wide);
83 }
84
85 register_deactivation_hook(__FILE__, 'bitforms_deactivate_plugin');
86
87 /**
88 * Handles plugin uninstall.
89 *
90 * @access private
91 */
92 function bitforms_uninstall_plugin()
93 {
94 if (version_compare(PHP_VERSION, '5.6.0', '<')) {
95 return;
96 }
97
98 do_action('bitforms_uninstall');
99 }
100 register_uninstall_hook(__FILE__, 'bitforms_uninstall_plugin');
101