PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.3.0
JetFormBuilder — Dynamic Blocks Form Builder v3.3.0
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 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 / compatibility / bricks / bricks.php
jetformbuilder / compatibility / bricks Last commit date
assets 2 years ago widgets 2 years ago bricks.php 2 years ago
bricks.php
65 lines
1 <?php
2
3
4 namespace JFB_Compatibility\Bricks;
5
6 use Bricks\Elements;
7 use Jet_Form_Builder\Plugin;
8 use Jet_Form_Builder\Classes\Tools;
9 use JFB_Components\Compatibility\Base_Compat_Handle_Trait;
10 use JFB_Components\Compatibility\Base_Compat_Url_Trait;
11 use JFB_Components\Compatibility\Base_Compat_Dir_Trait;
12 use JFB_Components\Module\Base_Module_Handle_It;
13 use JFB_Components\Module\Base_Module_It;
14 use JFB_Components\Module\Base_Module_Url_It;
15 use JFB_Components\Module\Base_Module_Dir_It;
16
17 // If this file is called directly, abort.
18 if ( ! defined( 'WPINC' ) ) {
19 die;
20 }
21
22 class Bricks implements Base_Module_It, Base_Module_Handle_It, Base_Module_Url_It, Base_Module_Dir_It {
23
24 use Base_Compat_Handle_Trait;
25 use Base_Compat_Url_Trait;
26 use Base_Compat_Dir_Trait;
27
28 public function rep_item_id() {
29 return 'bricks';
30 }
31
32 public function condition(): bool {
33 return defined( 'BRICKS_VERSION' );
34 }
35
36 public function init_hooks() {
37 add_action( 'init', array( $this, 'register_elements' ), 10 );
38 add_action( 'wp_enqueue_scripts', array( $this, 'editor_styles' ) );
39 }
40
41 public function remove_hooks() {
42 remove_action( 'init', array( $this, 'register_elements' ) );
43 remove_action( 'wp_enqueue_scripts', array( $this, 'editor_styles' ) );
44 }
45
46 public function register_elements() {
47 $file_path = $this->get_dir( 'widgets/form.php' );
48 Elements::register_element( $file_path, '', 'JFB_Compatibility\Bricks\Widgets\Form' );
49
50 do_action( 'jet-form-builder/bricks/register-elements' );
51 }
52
53 public function editor_styles() {
54 // Enqueue your files on the canvas & frontend, not the builder panel. Otherwise custom CSS might affect builder)
55 if ( Tools::is_editor() ) {
56 wp_enqueue_style(
57 $this->get_handle( 'icons' ),
58 $this->get_url( 'assets/build/css/editor/icons.css' ),
59 array(),
60 Plugin::instance()->get_version()
61 );
62 }
63 }
64 }
65