-
Notifications
You must be signed in to change notification settings - Fork 135
/
filter-course.php
92 lines (92 loc) · 2.36 KB
/
filter-course.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
/**
* Fields config widget Course Filter.
*/
return apply_filters(
'learn-press/widget/course-filter/settings',
array(
'title' => array(
'label' => esc_html__( 'Title', 'learnpress' ),
'type' => 'text',
'std' => esc_html__( 'Course Filter', 'learnpress' ),
),
'number_level_category' => array(
'label' => __( 'Level of category to display on Frontend', 'learnpress' ),
'type' => 'number',
'std' => 2,
'min' => 1,
),
'class_list_courses_target' => array(
'label' => __( 'Class of list courses want to filter', 'learnpress' ),
'type' => 'text',
'std' => '.lp-list-courses-default',
),
'show_in_rest' => array(
'label' => __( 'Load widget via REST', 'learnpress' ),
'type' => 'checkbox',
'std' => 1,
),
'hide_count_zero' => array(
'label' => __( 'Hide field has count is zero', 'learnpress' ),
'type' => 'checkbox',
'std' => 1,
),
'search_suggestion' => array(
'label' => __( 'Enable Keyword Search Suggestion', 'learnpress' ),
'type' => 'checkbox',
'std' => 1,
),
'fields_order' => array(
'label' => '',
'type' => 'hidden',
),
'fields' => array(
'label' => __( 'Fields', 'learnpress' ),
'type' => 'sortable-checkbox',
'options' => array(
'search' => array(
'id' => 'search',
'label' => esc_html__( 'Keyword', 'learnpress' ),
),
'price' => array(
'id' => 'price',
'label' => esc_html__( 'Price', 'learnpress' ),
),
'category' => array(
'id' => 'category',
'label' => esc_html__( 'Course Category', 'learnpress' ),
),
'tag' => array(
'id' => 'tag',
'label' => esc_html__( 'Course Tag', 'learnpress' ),
),
'author' => array(
'id' => 'author',
'label' => esc_html__( 'Author', 'learnpress' ),
),
'level' => array(
'id' => 'level',
'label' => esc_html__( 'Level', 'learnpress' ),
),
'btn_submit' => array(
'id' => 'btn_submit',
'label' => esc_html__( 'Button Submit', 'learnpress' ),
),
'btn_reset' => array(
'id' => 'level',
'label' => esc_html__( 'Button Reset', 'learnpress' ),
),
),
'std' => [
'search',
'price',
'category',
'tag',
'author',
'level',
'btn_submit',
'btn_reset',
],
),
)
);