PluginProbe
JetFormBuilder — Dynamic Blocks Form Builder / 1.1.5
JetFormBuilder — Dynamic Blocks Form Builder v1.1.5
3.6.5.2 3.6.5.1 3.6.5 3.6.4.2 3.6.4.1 3.6.4 3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 All 130 releases
← All changes | includes/plugin.php +9 -33 1.0.01.1.5 View file →
@@ -2,10 +2,12 @@
2 2
3 3 namespace Jet_Form_Builder;
4 4
5 5 // If this file is called directly, abort.
6 -use Jet_Form_Builder\Classes\Frontend_Helper;
6 +use Jet_Form_Builder\Classes\Instance_Trait;
7 +use Jet_Form_Builder\Form_Patterns;
7 8 use Jet_Form_Builder\Integrations\Forms_Captcha;
9 +use Jet_Form_Builder\Widgets\Elementor_Controller;
8 10
9 11 if ( ! defined( 'WPINC' ) ) {
10 12 die;
11 13 }
@@ -14,20 +16,9 @@
14 16 * Main file
15 17 */
16 18 class Plugin {
17 19
18 - /**
19 - * Instance.
20 - *
21 - * Holds the plugin instance.
22 - *
23 - * @since 1.0.0
24 - * @access public
25 - * @static
26 - *
27 - * @var Plugin
28 - */
29 - public static $instance = null;
20 + use Instance_Trait;
30 21
31 22 public $post_type;
32 23 public $blocks;
33 24 public $actions;
@@ -34,32 +25,14 @@
34 25 public $form;
35 26 public $form_handler;
36 27 public $editor;
37 28 public $captcha;
29 + public $dev_manager;
38 30
39 31 public $is_activated_jet_sm;
32 + public $allow_gateways;
40 33
41 34 /**
42 - * Instance.
43 - *
44 - * Ensures only one instance of the plugin class is loaded or can be loaded.
45 - *
46 - * @return Plugin An instance of the class.
47 - * @since 1.0.0
48 - * @access public
49 - * @static
50 - *
51 - */
52 - public static function instance() {
53 -
54 - if ( is_null( self::$instance ) ) {
55 - self::$instance = new self();
56 - }
57 -
58 - return self::$instance;
59 - }
60 -
61 - /**
62 35 * Register autoloader.
63 36 */
64 37 private function register_autoloader() {
65 38 require JET_FORM_BUILDER_PATH . 'includes' . DIRECTORY_SEPARATOR . 'autoloader.php';
@@ -71,8 +44,9 @@
71 44 *
72 45 * @return void
73 46 */
74 47 public function init_components() {
48 + $this->allow_gateways = apply_filters( 'jet-form-builder/allow-gateways', false );
75 49
76 50 $this->post_type = new Post_Type();
77 51 $this->blocks = new Blocks\Manager();
78 52 $this->actions = new Actions\Manager();
@@ -79,9 +53,11 @@
79 53 $this->form = new Form_Manager();
80 54 $this->form_handler = new Form_Handler();
81 55 $this->captcha = new Forms_Captcha();
82 56
57 + Dev_Mode\Manager::instance();
83 58 File_Upload::instance();
59 + new Elementor_Controller();
84 60
85 61 if ( is_admin() ) {
86 62 $this->editor = new Admin\Editor();
87 63 }