PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.15.3
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.15.3
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
← All changes | bitforms.php +5 -75 V3.0.22.15.3 View file →
@@ -3,9 +3,9 @@
3 3 /**
4 4 * Plugin Name: Bit Form
5 5 * Plugin URI: https://www.bitapps.pro/bit-form
6 6 * Description: Contact Form Builder Plugin: Multi Step Contact Form, Payment Form, Custom Contact Form Plugin by Bit Form
7 - * Version: 3.0.2
7 + * Version: 2.15.3
8 8 * Author: Contact Form Builder - Bit Form
9 9 * Author URI: https://www.bitapps.pro
10 10 * Text Domain: bit-form
11 11 * Requires PHP: 7.4
@@ -20,14 +20,13 @@
20 20 exit;
21 21 }
22 22
23 23 // Define most essential constants.
24 -define('BITFORMS_VERSION', '3.0.2');
24 +define('BITFORMS_VERSION', '2.15.3');
25 25 define('BITFORMS_PLUGIN_MAIN_FILE', __FILE__);
26 -define('BITFORMS_REQUIRED_BITFORMPRO_VERSION', '3.0.0');
27 26
28 27 global $bitforms_db_version;
29 -$bitforms_db_version = '3.0';
28 +$bitforms_db_version = '2.3';
30 29 define('BITFORMS_DB_VERSION', $bitforms_db_version);
31 30 define('BITFORMS_REQUIRED_WP_VERSION', '5.1');
32 31 define('BITFORMS_REQUIRED_PHP_VERSION', '7.4');
33 32 define('BITFORMS_API_VERSION', '1.0');
@@ -44,10 +43,10 @@
44 43 function bitforms_activate_plugin($network_wide)
45 44 {
46 45 if (version_compare(PHP_VERSION, '5.6.0', '<')) {
47 46 wp_die(
48 - 'Bit Form requires PHP version 5.6 or higher.',
49 - 'Error Activating'
47 + esc_html_e('bitforms requires PHP version 5.6.', 'bit-form'),
48 + esc_html_e('Error Activating', 'bit-form')
50 49 );
51 50 }
52 51
53 52 do_action('bitforms_activation', $network_wide);
@@ -82,73 +81,4 @@
82 81
83 82 do_action('bitforms_uninstall');
84 83 }
85 84 register_uninstall_hook(__FILE__, 'bitforms_uninstall_plugin');
86 -
87 -add_action('plugins_loaded', 'bitforms_check_pro_version');
88 -
89 -function bitforms_check_pro_version()
90 -{
91 - if (!defined('BITFORMPRO_VERSION')) {
92 - return;
93 - }
94 - if (!version_compare(BITFORMPRO_VERSION, BITFORMS_REQUIRED_BITFORMPRO_VERSION, '>=')) {
95 - add_action('admin_notices', 'bitformsProUpgradeNotice');
96 - }
97 -}
98 -
99 -function bitformsProUpgradeNotice()
100 -{
101 - // user meta calls safe here — admin_notices fires well after user initialisation
102 - $dismissed_for = get_user_meta(get_current_user_id(), 'bitforms_dismiss_pro_upgrade_notice', true);
103 - if (BITFORMS_REQUIRED_BITFORMPRO_VERSION === $dismissed_for) {
104 - return;
105 - }
106 -
107 - $update_url = esc_url(admin_url('plugins.php?plugin_status=upgrade'));
108 - $required = esc_html(BITFORMS_REQUIRED_BITFORMPRO_VERSION);
109 -
110 - // Keep HTML out of translatable strings to prevent translator HTML injection
111 - $message = '<strong>' . esc_html__('Bit Form Pro', 'bit-form') . '</strong> '
112 - . sprintf(
113 - /* translators: %s: minimum required version number */
114 - esc_html__('requires an update to version %s or higher for full compatibility.', 'bit-form'),
115 - '<strong>' . $required . '</strong>'
116 - )
117 - . ' <a href="' . $update_url . '">' . esc_html__('Update now', 'bit-form') . '</a>';
118 -
119 - wp_admin_notice(
120 - $message,
121 - [
122 - 'type' => 'error',
123 - 'dismissible' => true,
124 - 'additional_classes' => ['bitforms-pro-upgrade-notice'],
125 - 'attributes' => [
126 - 'data-nonce' => wp_create_nonce('bitforms_dismiss_pro_notice'),
127 - 'data-ajax-url' => esc_url(admin_url('admin-ajax.php')),
128 - ],
129 - 'paragraph_wrap' => true,
130 - ]
131 - );
132 -
133 - // Script at footer — avoids mid-page inline script
134 - add_action('admin_footer', 'bitformsProUpgradeNoticeScript');
135 -}
136 -
137 -function bitformsProUpgradeNoticeScript()
138 -{
139 - ?>
140 - <script>
141 - (function () {
142 - var notice = document.querySelector('.bitforms-pro-upgrade-notice');
143 - if (!notice) return;
144 - notice.addEventListener('click', function (e) {
145 - if (!e.target.classList.contains('notice-dismiss')) return;
146 - var fd = new FormData();
147 - fd.append('action', 'bitforms_dismiss_pro_notice');
148 - fd.append('nonce', notice.dataset.nonce);
149 - fetch(notice.dataset.ajaxUrl, { method: 'POST', credentials: 'same-origin', body: fd });
150 - });
151 - }());
152 - </script>
153 - <?php
154 -}