PluginProbe
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz / 2.12.7
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz v2.12.7
2.12.7 2.12.6 2.12.5 2.12.4 2.12.3 2.12.2 2.12.1 2.12.0 2.11.1 2.11.0 2.10.1 2.10.0 2.9.1 2.9.0 2.8.2 2.8.1 2.7.0 2.7.1 2.8.0 trunk 0.0.10 0.0.11 0.0.12 0.0.13 0.0.2 All 97 releases
← All changes | plugin-loader.php +31 -4 2.7.02.12.7 View file →
@@ -7,13 +7,19 @@
7 7 */
8 8
9 9 namespace SRFM;
10 10
11 +if ( ! defined( 'ABSPATH' ) ) {
12 + exit; // Exit if accessed directly.
13 +}
14 +
11 15 use SRFM\Admin\Admin;
12 16 use SRFM\Admin\Analytics;
13 17 use SRFM\Admin\Notice_Manager;
14 18 use SRFM\Inc\Abilities\Abilities_Registrar;
15 19 use SRFM\Inc\Activator;
20 +use SRFM\Inc\Admin\Editor_Nudge;
21 +use SRFM\Inc\Admin\Html_Form_Detector;
16 22 use SRFM\Inc\Admin_Ajax;
17 23 use SRFM\Inc\AI_Form_Builder\AI_Auth;
18 24 use SRFM\Inc\AI_Form_Builder\AI_Form_Builder;
19 25 use SRFM\Inc\AI_Form_Builder\AI_Helper;
@@ -19,8 +25,11 @@
19 25 use SRFM\Inc\AI_Form_Builder\AI_Helper;
20 26 use SRFM\Inc\AI_Form_Builder\Field_Mapping;
21 27 use SRFM\Inc\Background_Process;
22 28 use SRFM\Inc\Blocks\Register;
29 +use SRFM\Inc\Compatibility\Multilingual\Multilingual_Manager;
30 +use SRFM\Inc\Compatibility\Multilingual\String_Backfill;
31 +use SRFM\Inc\Compatibility\Multilingual\String_Collector;
23 32 use SRFM\Inc\Compatibility\Themes\Astra;
24 33 use SRFM\Inc\Create_New_Form;
25 34 use SRFM\Inc\Database\Register as DatabaseRegister;
26 35 use SRFM\Inc\Duplicate_Form;
@@ -27,16 +36,21 @@
27 36 use SRFM\Inc\Events_Scheduler;
28 37 use SRFM\Inc\Export;
29 38 use SRFM\Inc\Form_Restriction;
30 39 use SRFM\Inc\Form_Submit;
40 +use SRFM\Inc\Form_Views;
31 41 use SRFM\Inc\Forms_Data;
32 42 use SRFM\Inc\Frontend_Assets;
33 43 use SRFM\Inc\Generate_Form_Markup;
34 44 use SRFM\Inc\Global_Settings\Email_Summary;
35 45 use SRFM\Inc\Global_Settings\Global_Settings;
46 +use SRFM\Inc\Global_Settings\Global_Settings_Defaults;
36 47 use SRFM\Inc\Gutenberg_Hooks;
37 48 use SRFM\Inc\Helper;
38 49 use SRFM\Inc\Learn;
50 +// region: form-migration — Phase P1 foundation.
51 +use SRFM\Inc\Migrator\Bootstrap as Migrator_Bootstrap;
52 +// endregion: form-migration.
39 53 use SRFM\Inc\Onboarding;
40 54 use SRFM\Inc\Page_Builders\Page_Builders;
41 55 use SRFM\Inc\Payments\Payments;
42 56 use SRFM\Inc\Post_Types;
@@ -41,15 +55,12 @@
41 55 use SRFM\Inc\Payments\Payments;
42 56 use SRFM\Inc\Post_Types;
43 57 use SRFM\Inc\Rest_Api;
44 58 use SRFM\Inc\Single_Form_Settings\Compliance_Settings;
59 +use SRFM\Inc\Single_Form_Settings\Form_Settings_Api;
45 60 use SRFM\Inc\Smart_Tags;
46 61 use SRFM\Inc\Updater;
47 62
48 -if ( ! defined( 'ABSPATH' ) ) {
49 - exit; // Exit if accessed directly.
50 -}
51 -
52 63 /**
53 64 * Plugin_Loader
54 65 *
55 66 * @since 0.0.1
@@ -211,9 +222,15 @@
211 222 if ( is_admin() ) {
212 223 Admin::get_instance();
213 224 // phpcs:ignore /** @phpstan-ignore-next-line */ -- Class is loaded dynamically in WordPress
214 225 Notice_Manager::get_instance();
226 + Editor_Nudge::get_instance();
215 227 }
228 + // Always instantiate — script enqueue is self-gated by `allow_load()`,
229 + // while the REST endpoint for converting HTML forms must register
230 + // outside the admin context (REST dispatch runs with `is_admin()` ===
231 + // false, so admin-only instantiation would 404 the endpoint).
232 + Html_Form_Detector::get_instance();
216 233 Payments::get_instance();
217 234 Duplicate_Form::get_instance();
218 235 Learn::get_instance();
219 236 }
@@ -267,8 +284,9 @@
267 284 // Look in local /wp-content/plugins/sureforms/languages/ folder.
268 285 load_textdomain( 'sureforms', $mofile_local );
269 286 } else {
270 287 // Load the default language files.
288 + // phpcs:ignore PluginCheck.CodeAnalysis.DiscouragedFunctions.load_plugin_textdomainFound -- Fallback when no global/local .mo override is present.
271 289 load_plugin_textdomain( 'sureforms', false, $lang_dir );
272 290 }
273 291 }
274 292
@@ -287,15 +305,18 @@
287 305 Helper::get_instance();
288 306 Activator::get_instance();
289 307 Admin_Ajax::get_instance();
290 308 Forms_Data::get_instance();
309 + Form_Views::get_instance();
291 310 Export::get_instance();
292 311 Smart_Tags::get_instance();
293 312 Generate_Form_Markup::get_instance();
294 313 Create_New_Form::get_instance();
295 314 Global_Settings::get_instance();
315 + Global_Settings_Defaults::get_instance();
296 316 Email_Summary::get_instance();
297 317 Compliance_Settings::get_instance();
318 + Form_Settings_Api::get_instance();
298 319 Events_Scheduler::get_instance();
299 320 AI_Form_Builder::get_instance();
300 321 Field_Mapping::get_instance();
301 322 Background_Process::get_instance();
@@ -300,8 +321,11 @@
300 321 Field_Mapping::get_instance();
301 322 Background_Process::get_instance();
302 323 Page_Builders::get_instance();
303 324 Rest_Api::get_instance();
325 + // region: form-migration — Phase P1 foundation.
326 + Migrator_Bootstrap::get_instance();
327 + // endregion: form-migration.
304 328 AI_Helper::get_instance();
305 329 AI_Auth::get_instance();
306 330 Updater::get_instance();
307 331 Onboarding::get_instance();
@@ -309,8 +333,11 @@
309 333 Form_Restriction::get_instance();
310 334 Abilities_Registrar::get_instance();
311 335 // Initializing Compatibilities.
312 336 Astra::get_instance();
337 + Multilingual_Manager::get_instance();
338 + String_Collector::get_instance();
339 + String_Backfill::get_instance();
313 340
314 341 /**
315 342 * Load core files necessary for the Spectra block.
316 343 * This method is called in the Spectra block loader to ensure core files are loaded during the 'plugins_loaded' action.