PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 3.3.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v3.3.1
3.3.1 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 All 138 releases
← All changes | includes/Plugin.php +21 -5 3.2.23.3.1 View file →
@@ -38,9 +38,9 @@
38 38 */
39 39 public function register()
40 40 {
41 41 add_action('plugins_loaded', [$this, 'init_plugin']);
42 - // add_action('init', [$this, 'localization_setup']);
42 + add_action('init', [$this, 'localization_setup']);
43 43 (new Activation())->activate();
44 44 (new Deactivation())->register();
45 45 (new Uninstallation())->register();
46 46 }
@@ -178,9 +178,25 @@
178 178 new RegisterBitFormElementorWidget();
179 179 }
180 180 }
181 181
182 - // public function localization_setup()
183 - // {
184 - // // load_plugin_textdomain('bit-form', false, dirname(BITFORMS_PLUGIN_BASENAME) . '/languages');
185 - // }
182 + /**
183 + * Registers the bundled translations directory for the `bit-form` text domain.
184 + */
185 + public function localization_setup()
186 + {
187 + /**
188 + * Filters whether Bit Form loads its bundled translations at all.
189 + *
190 + * Returning false leaves every Free string untranslated — the same filter gates
191 + * the React admin bundle in Admin_Bar. Pro has its own
192 + * `bitformpro_filter_allow_translation`.
193 + *
194 + * @param bool $allow Whether to load translations. Default true.
195 + */
196 + if (!apply_filters('bitform_filter_allow_translation', true)) {
197 + return;
198 + }
199 +
200 + load_plugin_textdomain('bit-form', false, \dirname(BITFORMS_PLUGIN_BASENAME) . '/languages');
201 + }
186 202 }