-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
64 lines (60 loc) · 1.21 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* Register a new form
*
* @date 2024-04-10
*
* @param string $form_name The name of the form
* @param array $fields
* @param array $options
* @param mixed $initial_data
*
* @return void
*/
function register_form($form_name, $fields, $options = [], $actions = [], $initial_data = null)
{
\Ajaxy\Forms\Plugin::init()->register($form_name, $fields, $options, $actions, $initial_data);
}
/**
* Register a form action
*
* @date 2024-04-10
*
* @param string $form_name
* @param string $action_name
* @param array $options
*
* @return void
*/
function register_form_action($form_name, $action_name, $options = [])
{
\Ajaxy\Forms\Plugin::init()->register_action($form_name, $action_name, $options);
}
/**
* Register a form field type
*
* @date 2024-05-19
*
* @param string $type
* @param array $options
*
* @return void
*/
function register_form_field($type, $options)
{
\Ajaxy\Forms\Plugin::init()->register_field($type, $options);
}
/**
* Register a form action type
*
* @date 2024-05-19
*
* @param string $type
* @param array $options
*
* @return void
*/
function register_form_action_type($type, $options)
{
\Ajaxy\Forms\Plugin::init()->register_action_type($type, $options);
}