Nuxy
Search…
14. Sortable
Add list with available options with sort functionality
Sorter view
Example adding
1
'sorter_field' => array(
2
'type' => 'sorter',
3
'label' => esc_html__( 'Hello there', 'my-domain' ),
4
'options' => array(
5
array(
6
'id' => 'list_1',
7
'name' => esc_html__( 'List 1', 'my-domain' ),
8
'options' => array(
9
array(
10
'id' => 'key_2',
11
'label' => esc_html__( 'Key 2', 'my-domain' )
12
),
13
array(
14
'id' => 'key_9',
15
'label' => esc_html__( 'Key 9', 'my-domain' )
16
),
17
)
18
),
19
array(
20
'id' => 'list_2',
21
'name' => esc_html__( 'List 2', 'my-domain' ),
22
'options' => array(
23
array(
24
'id' => 'key_4',
25
'label' => esc_html__( 'Key 4', 'my-domain' )
26
),
27
array(
28
'id' => 'key_3',
29
'label' => esc_html__( 'Key 3', 'my-domain' )
30
),
31
array(
32
'id' => 'key_7',
33
'label' => esc_html__( 'Key 7', 'my-domain' )
34
),
35
array(
36
'id' => 'key_8',
37
'label' => esc_html__( 'Key 8', 'my-domain' )
38
),
39
)
40
),
41
array(
42
'id' => 'list_3',
43
'name' => esc_html__( 'List 3', 'my-domain' ),
44
'options' => array(
45
array(
46
'id' => 'key_5',
47
'label' => esc_html__( 'Key 5', 'my-domain' )
48
),
49
array(
50
'id' => 'key_6',
51
'label' => esc_html__( 'Key 6', 'my-domain' )
52
),
53
)
54
),
55
)
56
),
Copied!
Copy link