| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Bit Form |
| 4 |
* Plugin URI: bitpress.pro |
| 5 |
* Description: Wordpress form builder plugin |
| 6 |
* Version: 1.0.4 |
| 7 |
* Author: BitPress |
| 8 |
* Author URI: https://www.bitpress.pro |
| 9 |
* Text Domain: bitforms |
| 10 |
* Domain Path: /languages |
| 11 |
* License: GPLv2 or later |
| 12 |
*/ |
| 13 |
|
| 14 |
/*** |
| 15 |
* If try to direct access plugin folder it will Exit |
| 16 |
**/ |
| 17 |
if (!defined('ABSPATH')) { |
| 18 |
exit; |
| 19 |
} |
| 20 |
|
| 21 |
|
| 22 |
// Define most essential constants. |
| 23 |
define('BITFORMS_VERSION', '1.0.4'); |
| 24 |
define('BITFORMS_PLUGIN_MAIN_FILE', __FILE__); |
| 25 |
|
| 26 |
global $bitforms_db_version; |
| 27 |
$bitforms_db_version = '1.0'; |
| 28 |
|
| 29 |
/** |
| 30 |
* Handles plugin activation. |
| 31 |
* |
| 32 |
* Throws an error if the plugin is activated on an older version than PHP 5.4. |
| 33 |
*/ |
| 34 |
function bitforms_activate_plugin($network_wide) |
| 35 |
{ |
| 36 |
if (version_compare(PHP_VERSION, '5.4.0', '<')) { |
| 37 |
wp_die( |
| 38 |
esc_html__('bitforms requires PHP version 5.4.', 'bitform'), |
| 39 |
esc_html__('Error Activating', 'bitform') |
| 40 |
); |
| 41 |
} |
| 42 |
|
| 43 |
do_action('bitforms_activation', $network_wide); |
| 44 |
} |
| 45 |
|
| 46 |
register_activation_hook(__FILE__, 'bitforms_activate_plugin'); |
| 47 |
|
| 48 |
/** |
| 49 |
* Handles plugin deactivation. |
| 50 |
*/ |
| 51 |
function bitforms_deactivate_plugin($network_wide) |
| 52 |
{ |
| 53 |
if (version_compare(PHP_VERSION, '5.4.0', '<')) { |
| 54 |
return; |
| 55 |
} |
| 56 |
|
| 57 |
do_action('bitforms_deactivation', $network_wide); |
| 58 |
} |
| 59 |
|
| 60 |
register_deactivation_hook(__FILE__, 'bitforms_deactivate_plugin'); |
| 61 |
|
| 62 |
/** |
| 63 |
* Handles plugin uninstall. |
| 64 |
* |
| 65 |
* @access private |
| 66 |
*/ |
| 67 |
function bitforms_uninstall_plugin() |
| 68 |
{ |
| 69 |
if (version_compare(PHP_VERSION, '5.6.0', '<')) { |
| 70 |
return; |
| 71 |
} |
| 72 |
|
| 73 |
do_action('bitforms_uninstall'); |
| 74 |
} |
| 75 |
register_uninstall_hook(__FILE__, 'bitforms_uninstall_plugin'); |
| 76 |
|
| 77 |
if (version_compare(PHP_VERSION, '5.6.0', '>=')) { |
| 78 |
require_once plugin_dir_path(__FILE__) . 'includes/loader.php'; |
| 79 |
} |
| 80 |
|