PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.5.4
JetFormBuilder — Dynamic Blocks Form Builder v3.5.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 / modules / actions-v2 / mailchimp / mailchimp.php
jetformbuilder / modules / actions-v2 / mailchimp Last commit date
api 1 year ago assets 1 year ago rest-api 1 year ago mailchimp-action.php 1 year ago mailchimp-tab-handler.php 1 year ago mailchimp.php 1 year ago
mailchimp.php
75 lines
1 <?php
2
3 namespace JFB_Modules\Actions_V2\Mailchimp;
4
5 use Jet_Form_Builder\Actions\Manager;
6 use Jet_Form_Builder\Admin\Tabs_Handlers\Base_Handler;
7 use Jet_Form_Builder\Admin\Tabs_Handlers\Tab_Handler_Manager;
8 use JFB_Modules\Actions_V2\Interfaces\Action_Integration_Interface;
9 use JFB_Modules\Actions_V2\Mailchimp\Rest_Api\Mailchimp\Mailchimp_Route;
10 use JFB_Modules\Actions_V2\Traits\Action_Integration_Trait;
11
12 final class Mailchimp implements Action_Integration_Interface {
13
14 use Action_Integration_Trait;
15
16 public function rep_item_id() {
17 return 'mailchimp';
18 }
19
20 public function on_install() {
21 // install tab handler for Settings page
22 Tab_Handler_Manager::instance()->install( new Mailchimp_Tab_Handler() );
23 }
24
25 public function init_hooks() {
26 add_action(
27 'jet-form-builder/editor-assets/after',
28 array( $this, 'editor_assets' )
29 );
30 add_action(
31 'rest_api_init',
32 array( $this, 'rest_api_init' )
33 );
34 }
35
36 public function register_actions( Manager $manager ) {
37 $manager->register_action_type( new Mailchimp_Action() );
38 }
39
40 public function editor_assets() {
41 $script_asset = require_once $this->get_dir( 'assets/build/editor.asset.php' );
42
43 array_push(
44 $script_asset['dependencies'],
45 'jet-fb-components',
46 'jet-fb-data',
47 'jet-fb-actions-v2',
48 'jet-fb-blocks-v2-to-actions-v2'
49 );
50
51 wp_enqueue_script(
52 $this->get_handle(),
53 $this->get_url( 'assets/build/editor.js' ),
54 $script_asset['dependencies'],
55 $script_asset['version'],
56 true
57 );
58 }
59
60 public function rest_api_init() {
61 $mailchimp = new Mailchimp_Route();
62 $mailchimp->register();
63
64 register_setting(
65 trim( Base_Handler::PREFIX, '_' ),
66 Base_Handler::PREFIX . 'mailchimp-tab',
67 array(
68 'type' => 'string',
69 'show_in_rest' => true,
70 'default' => '{}',
71 )
72 );
73 }
74 }
75