| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Plugin Name: Bit Integrations |
| 5 |
* Plugin URI: https://bitapps.pro/bit-integrations |
| 6 |
* 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 |
| 7 |
* Version: 2.10.4 |
| 8 |
* Author: Automation & Integration Plugin - Bit Apps |
| 9 |
* Author URI: https://bitapps.pro |
| 10 |
* Text Domain: bit-integrations |
| 11 |
* Requires PHP: 7.4 |
| 12 |
* Requires at least: 5.1 |
| 13 |
* Tested up to: 7.1 |
| 14 |
* Domain Path: /languages |
| 15 |
* License: GPL-2.0-or-later |
| 16 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 17 |
*/ |
| 18 |
|
| 19 |
use BitApps\Integrations\Config; |
| 20 |
|
| 21 |
// If try to direct access plugin folder it will Exit |
| 22 |
if (!defined('ABSPATH')) { |
| 23 |
exit; |
| 24 |
} |
| 25 |
/** |
| 26 |
* @deprecated since version 2.7.8. use Config::DB_VERSION instead. |
| 27 |
*/ |
| 28 |
global $btcbi_db_version; |
| 29 |
$btcbi_db_version = '1.2'; |
| 30 |
|
| 31 |
// Define most essential constants. |
| 32 |
/** |
| 33 |
* deprecated since version 2.7.8. |
| 34 |
* |
| 35 |
* @deprecated 2.7.8 Use Config::VERSION instead. |
| 36 |
*/ |
| 37 |
define('BTCBI_VERSION', '2.10.4'); |
| 38 |
/** |
| 39 |
* deprecated since version 2.7.8. |
| 40 |
* |
| 41 |
* @deprecated 2.7.8 Use `BIT_INTEGRATIONS_PLUGIN_FILE` instead. |
| 42 |
*/ |
| 43 |
define('BTCBI_PLUGIN_MAIN_FILE', __FILE__); |
| 44 |
|
| 45 |
define('BIT_INTEGRATIONS_PLUGIN_FILE', __FILE__); |
| 46 |
|
| 47 |
require_once plugin_dir_path(__FILE__) . 'backend/loader.php'; |
| 48 |
|
| 49 |
if (!class_exists(Config::class)) { |
| 50 |
return; |
| 51 |
} |
| 52 |
/** |
| 53 |
* @deprecated since version 2.7.8. Use `bit_integrations_activate_plugin()` instead. |
| 54 |
* |
| 55 |
* @param mixed $network_wide |
| 56 |
*/ |
| 57 |
function btcbi_activate_plugin($network_wide) |
| 58 |
{ |
| 59 |
bit_integrations_activate_plugin($network_wide); |
| 60 |
} |
| 61 |
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- `bit_integrations_` is the plugin slug; Plugin Check infers prefixes from hook names and misses it because the plugin fires third-party hooks. |
| 62 |
function bit_integrations_activate_plugin($network_wide) |
| 63 |
{ |
| 64 |
global $wp_version; |
| 65 |
if (version_compare($wp_version, '5.1', '<')) { |
| 66 |
wp_die( |
| 67 |
esc_html__('This plugin requires WordPress version 5.1 or higher.', 'bit-integrations'), |
| 68 |
esc_html__('Error Activating', 'bit-integrations') |
| 69 |
); |
| 70 |
} |
| 71 |
if (version_compare(PHP_VERSION, '7.4', '<')) { |
| 72 |
wp_die( |
| 73 |
esc_html__('Bit Integrations requires PHP version 7.4.', 'bit-integrations'), |
| 74 |
esc_html__('Error Activating', 'bit-integrations') |
| 75 |
); |
| 76 |
} |
| 77 |
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound -- hook is prefixed via Config::VAR_PREFIX. |
| 78 |
do_action(Config::withPrefix('activation'), $network_wide); |
| 79 |
} |
| 80 |
register_activation_hook(__FILE__, 'bit_integrations_activate_plugin'); |
| 81 |
/** |
| 82 |
* @deprecated since version 2.7.8. Use `bit_integrations_deactivate_plugin()` instead. |
| 83 |
* |
| 84 |
* @param mixed $network_wide |
| 85 |
*/ |
| 86 |
function btcbi_deactivate_plugin($network_wide) |
| 87 |
{ |
| 88 |
bit_integrations_deactivate_plugin($network_wide); |
| 89 |
} |
| 90 |
|
| 91 |
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- `bit_integrations_` is the plugin slug; Plugin Check infers prefixes from hook names and misses it because the plugin fires third-party hooks. |
| 92 |
function bit_integrations_deactivate_plugin($network_wide) |
| 93 |
{ |
| 94 |
global $wp_version; |
| 95 |
if (version_compare($wp_version, '5.1', '<')) { |
| 96 |
wp_die( |
| 97 |
esc_html__('This plugin requires WordPress version 5.1 or higher.', 'bit-integrations'), |
| 98 |
esc_html__('Error Deactivating', 'bit-integrations') |
| 99 |
); |
| 100 |
} |
| 101 |
if (version_compare(PHP_VERSION, '7.4', '<')) { |
| 102 |
wp_die( |
| 103 |
esc_html__('Bit Integrations requires PHP version 7.4.', 'bit-integrations'), |
| 104 |
esc_html__('Error Deactivating', 'bit-integrations') |
| 105 |
); |
| 106 |
} |
| 107 |
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound -- hook is prefixed via Config::VAR_PREFIX. |
| 108 |
do_action(Config::withPrefix('deactivation'), $network_wide); |
| 109 |
} |
| 110 |
register_deactivation_hook(__FILE__, 'bit_integrations_deactivate_plugin'); |
| 111 |
|
| 112 |
/** |
| 113 |
* @deprecated since version 2.7.8. Use `bit_integrations_uninstall_plugin()` instead. |
| 114 |
*/ |
| 115 |
function btcbi_uninstall_plugin() |
| 116 |
{ |
| 117 |
bit_integrations_uninstall_plugin(); |
| 118 |
} |
| 119 |
|
| 120 |
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound -- `bit_integrations_` is the plugin slug; Plugin Check infers prefixes from hook names and misses it because the plugin fires third-party hooks. |
| 121 |
function bit_integrations_uninstall_plugin() |
| 122 |
{ |
| 123 |
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound -- hook is prefixed via Config::VAR_PREFIX. |
| 124 |
do_action(Config::withPrefix('uninstall')); |
| 125 |
} |
| 126 |
register_uninstall_hook(__FILE__, 'bit_integrations_uninstall_plugin'); |
| 127 |
|