PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 1.0.1
JetFormBuilder — Dynamic Blocks Form Builder v1.0.1
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 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / includes / plugin.php
jetformbuilder / includes Last commit date
actions 5 years ago admin 5 years ago blocks 5 years ago classes 5 years ago compatibility 5 years ago exceptions 5 years ago gateways 5 years ago generators 5 years ago integrations 5 years ago autoloader.php 5 years ago file-upload.php 5 years ago form-handler.php 5 years ago form-manager.php 5 years ago form-messages-builder.php 5 years ago form-messages-manager.php 5 years ago form-preset.php 5 years ago live-form.php 5 years ago plugin.php 5 years ago post-type.php 5 years ago request-handler.php 5 years ago
plugin.php
121 lines
1 <?php
2
3 namespace Jet_Form_Builder;
4
5 // If this file is called directly, abort.
6 use Jet_Form_Builder\Classes\Frontend_Helper;
7 use Jet_Form_Builder\Integrations\Forms_Captcha;
8
9 if ( ! defined( 'WPINC' ) ) {
10 die;
11 }
12
13 /**
14 * Main file
15 */
16 class Plugin {
17
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;
30
31 public $post_type;
32 public $blocks;
33 public $actions;
34 public $form;
35 public $form_handler;
36 public $editor;
37 public $captcha;
38
39 public $is_activated_jet_sm;
40
41 /**
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 * Register autoloader.
63 */
64 private function register_autoloader() {
65 require JET_FORM_BUILDER_PATH . 'includes' . DIRECTORY_SEPARATOR . 'autoloader.php';
66 Autoloader::run();
67 }
68
69 /**
70 * Initialize plugin parts
71 *
72 * @return void
73 */
74 public function init_components() {
75
76 $this->post_type = new Post_Type();
77 $this->blocks = new Blocks\Manager();
78 $this->actions = new Actions\Manager();
79 $this->form = new Form_Manager();
80 $this->form_handler = new Form_Handler();
81 $this->captcha = new Forms_Captcha();
82
83 File_Upload::instance();
84
85 if ( is_admin() ) {
86 $this->editor = new Admin\Editor();
87 }
88 }
89
90 /**
91 * Returns url to file or dir inside plugin folder
92 *
93 * @param string $path Path inside plugin dir.
94 *
95 * @return string
96 */
97 public function plugin_url( $path = null ) {
98 return JET_FORM_BUILDER_URL . $path;
99 }
100
101 /**
102 * Returns plugin version
103 */
104 public function get_version() {
105 return JET_FORM_BUILDER_VERSION;
106 }
107
108 /**
109 * Plugin constructor.
110 */
111 private function __construct() {
112
113 $this->register_autoloader();
114
115 add_action( 'after_setup_theme', array( $this, 'init_components' ), 0 );
116 }
117
118 }
119
120 Plugin::instance();
121