-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbitwpfi.php
More file actions
122 lines (112 loc) · 3.95 KB
/
bitwpfi.php
File metadata and controls
122 lines (112 loc) · 3.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?php
/**
* Plugin Name: Bit Integrations
* Plugin URI: https://bitapps.pro/bit-integrations
* Description: Bit Integrations is a platform that integrates with over 300+ different platforms to help with various tasks on your WordPress site, like WooCommerce, Form builder, Page builder, LMS, Sales funnels, Bookings, CRM, Webhooks, Email marketing, Social media and Spreadsheets, etc
* Version: 2.8.2
* Author: Automation & Integration Plugin - Bit Apps
* Author URI: https://bitapps.pro
* Text Domain: bit-integrations
* Requires PHP: 7.4
* Requires at least: 5.1
* Tested up to: 6.9
* Domain Path: /languages
* License: GPLv2 or later
*/
use BitApps\Integrations\Config;
// If try to direct access plugin folder it will Exit
if (!defined('ABSPATH')) {
exit;
}
/**
* @deprecated since version 2.7.8. use Config::DB_VERSION instead.
*/
global $btcbi_db_version;
$btcbi_db_version = '1.1';
// Define most essential constants.
/**
* deprecated since version 2.7.8.
*
* @deprecated 2.7.8 Use Config::VERSION instead.
*/
define('BTCBI_VERSION', '2.8.2');
/**
* deprecated since version 2.7.8.
*
* @deprecated 2.7.8 Use `BIT_INTEGRATIONS_PLUGIN_FILE` instead.
*/
define('BTCBI_PLUGIN_MAIN_FILE', __FILE__);
define('BIT_INTEGRATIONS_PLUGIN_FILE', __FILE__);
require_once plugin_dir_path(__FILE__) . 'backend/loader.php';
if (!class_exists(Config::class)) {
return;
}
/**
* @deprecated since version 2.7.8. Use `bit_integrations_activate_plugin()` instead.
*
* @param mixed $network_wide
*/
function btcbi_activate_plugin($network_wide)
{
bit_integrations_activate_plugin($network_wide);
}
function bit_integrations_activate_plugin($network_wide)
{
global $wp_version;
if (version_compare($wp_version, '5.1', '<')) {
wp_die(
esc_html__('This plugin requires WordPress version 5.1 or higher.', 'bit-integrations'),
esc_html__('Error Activating', 'bit-integrations')
);
}
if (version_compare(PHP_VERSION, '7.4', '<')) {
wp_die(
esc_html__('Bit Integrations requires PHP version 7.4.', 'bit-integrations'),
esc_html__('Error Activating', 'bit-integrations')
);
}
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound -- hook is prefixed via Config::VAR_PREFIX.
do_action(Config::withPrefix('activation'), $network_wide);
}
register_activation_hook(__FILE__, 'bit_integrations_activate_plugin');
/**
* @deprecated since version 2.7.8. Use `bit_integrations_deactivate_plugin()` instead.
*
* @param mixed $network_wide
*/
function btcbi_deactivate_plugin($network_wide)
{
bit_integrations_deactivate_plugin($network_wide);
}
function bit_integrations_deactivate_plugin($network_wide)
{
global $wp_version;
if (version_compare($wp_version, '5.1', '<')) {
wp_die(
esc_html__('This plugin requires WordPress version 5.1 or higher.', 'bit-integrations'),
esc_html__('Error Deactivating', 'bit-integrations')
);
}
if (version_compare(PHP_VERSION, '7.4', '<')) {
wp_die(
esc_html__('Bit Integrations requires PHP version 7.4.', 'bit-integrations'),
esc_html__('Error Deactivating', 'bit-integrations')
);
}
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound -- hook is prefixed via Config::VAR_PREFIX.
do_action(Config::withPrefix('deactivation'), $network_wide);
}
register_deactivation_hook(__FILE__, 'bit_integrations_deactivate_plugin');
/**
* @deprecated since version 2.7.8. Use `bit_integrations_uninstall_plugin()` instead.
*/
function btcbi_uninstall_plugin()
{
bit_integrations_uninstall_plugin();
}
function bit_integrations_uninstall_plugin()
{
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound -- hook is prefixed via Config::VAR_PREFIX.
do_action(Config::withPrefix('uninstall'));
}
register_uninstall_hook(__FILE__, 'bit_integrations_uninstall_plugin');