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 / register-user / register-user.php
jetformbuilder / modules / actions-v2 / register-user Last commit date
assets 1 year ago messages 1 year ago register-user-action.php 1 year ago register-user.php 1 year ago
register-user.php
77 lines
1 <?php
2
3 namespace JFB_Modules\Actions_V2\Register_User;
4
5 use Jet_Form_Builder\Actions\Manager;
6 use Jet_Form_Builder\Classes\Tools;
7 use JFB_Modules\Actions_V2\Interfaces\Action_Integration_Interface;
8 use JFB_Modules\Actions_V2\Register_User\Messages\Register_User_Messages;
9 use JFB_Modules\Actions_V2\Register_User\Messages\User_Specific_Messages;
10 use JFB_Modules\Actions_V2\Traits\Action_Integration_Trait;
11
12 final class Register_User implements Action_Integration_Interface {
13
14 use Action_Integration_Trait;
15
16 public function rep_item_id() {
17 return 'register-user';
18 }
19
20 public function init_hooks() {
21 add_action(
22 'jet-form-builder/editor-assets/after',
23 array( $this, 'editor_assets' )
24 );
25 add_filter(
26 'jet-form-builder/form-messages/register',
27 array( $this, 'register_message_types' )
28 );
29 }
30
31 public function on_install() {
32 }
33
34 public function register_actions( Manager $manager ) {
35 $manager->register_action_type( new Register_User_Action() );
36 }
37
38 public function register_message_types( array $types ): array {
39 array_push(
40 $types,
41 new User_Specific_Messages(),
42 new Register_User_Messages()
43 );
44
45 return $types;
46 }
47
48 public function editor_assets() {
49 $script_asset = require_once $this->get_dir( 'assets/build/editor.asset.php' );
50
51 array_push(
52 $script_asset['dependencies'],
53 'jet-fb-components',
54 'jet-fb-data',
55 'jet-fb-actions-v2',
56 'jet-fb-blocks-v2-to-actions-v2'
57 );
58
59 wp_enqueue_script(
60 $this->get_handle(),
61 $this->get_url( 'assets/build/editor.js' ),
62 $script_asset['dependencies'],
63 $script_asset['version'],
64 true
65 );
66
67 wp_localize_script(
68 $this->get_handle(),
69 'JetFBRegisterAction',
70 array(
71 'userRoles' => Tools::get_user_roles_for_js(),
72 'allUserRoles' => Tools::get_user_roles_for_js( array() ),
73 )
74 );
75 }
76 }
77