PluginProbe
JetFormBuilder — Dynamic Blocks Form Builder / 3.6.6
JetFormBuilder — Dynamic Blocks Form Builder v3.6.6
3.6.6.1 3.6.6 3.6.5.4 3.6.5.3 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 All 134 releases
jetformbuilder / modules / actions-v2 / call-hook / call-hook.php

call-hook.php in JetFormBuilder — Dynamic Blocks Form Builder 3.6.6, at modules/actions-v2/call-hook/call-hook.php

52 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace JFB_Modules\Actions_V2\Call_Hook;
4
5 use Jet_Form_Builder\Actions\Manager;
6 use JFB_Modules\Actions_V2\Interfaces\Action_Integration_Interface;
7 use JFB_Modules\Actions_V2\Traits\Action_Integration_Trait;
8
9 class Call_Hook implements Action_Integration_Interface {
10
11 use Action_Integration_Trait;
12
13 public function rep_item_id() {
14 return 'call-hook';
15 }
16
17 public function init_hooks() {
18 add_action(
19 'jet-form-builder/editor-assets/after',
20 array( $this, 'editor_assets' )
21 );
22 }
23
24 public function on_install() {
25 // TODO: Implement on_install() method.
26 }
27
28 public function register_actions( Manager $manager ) {
29 $manager->register_action_type( new Call_Hook_Action() );
30 }
31
32 public function editor_assets() {
33 $script_asset = require_once $this->get_dir( 'assets/build/editor.asset.php' );
34
35 array_push(
36 $script_asset['dependencies'],
37 'jet-fb-components',
38 'jet-fb-data',
39 'jet-fb-actions-v2',
40 'jet-fb-blocks-v2-to-actions-v2'
41 );
42
43 wp_enqueue_script(
44 $this->get_handle(),
45 $this->get_url( 'assets/build/editor.js' ),
46 $script_asset['dependencies'],
47 $script_asset['version'],
48 true
49 );
50 }
51 }
52