PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.7
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.7
4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 4.2.1 All 138 releases
learnpress / config / settings / general.php

general.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.7, at config/settings/general.php

169 lines 5.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 $currencies = learn_press_currencies();
3
4 foreach ( $currencies as $code => $name ) {
5 $currency_symbol = learn_press_get_currency_symbol( $code );
6 $currencies[ $code ] = sprintf( '%s (%s) - %s', $name, $currency_symbol, $code );
7 }
8
9 $data_struct_currency = [
10 'setting' => [
11 'plugins' => [],
12 ],
13 ];
14
15 return apply_filters(
16 'learn-press/general-settings-fields',
17 array(
18 array(
19 'title' => esc_html__( 'Pages setup', 'learnpress' ),
20 'type' => 'title',
21 ),
22 array(
23 'title' => esc_html__( 'All courses page', 'learnpress' ),
24 'id' => 'courses_page_id',
25 'default' => '',
26 'type' => 'pages-dropdown',
27 'value' => learn_press_get_page_id( 'courses' ),
28 ),
29 array(
30 'title' => esc_html__( 'All instructors page', 'learnpress' ),
31 'id' => 'instructors_page_id',
32 'default' => '',
33 'type' => 'pages-dropdown',
34 'value' => learn_press_get_page_id( 'instructors' ),
35 ),
36 array(
37 'title' => esc_html__( 'Single instructor page', 'learnpress' ),
38 'id' => 'single_instructor_page_id',
39 'default' => '',
40 'type' => 'pages-dropdown',
41 'value' => learn_press_get_page_id( 'single_instructor' ),
42 ),
43 array(
44 'title' => esc_html__( 'Profile page', 'learnpress' ),
45 'id' => 'profile_page_id',
46 'default' => '',
47 'type' => 'pages-dropdown',
48 'value' => learn_press_get_page_id( 'profile' ),
49 ),
50 array(
51 'title' => esc_html__( 'Checkout page', 'learnpress' ),
52 'id' => 'checkout_page_id',
53 'default' => '',
54 'type' => 'pages-dropdown',
55 'value' => learn_press_get_page_id( 'checkout' ),
56 ),
57 array(
58 'title' => esc_html__( 'Become an instructors page', 'learnpress' ),
59 'id' => 'become_a_teacher_page_id',
60 'default' => '',
61 'type' => 'pages-dropdown',
62 'value' => learn_press_get_page_id( 'become_a_teacher' ),
63 ),
64 array(
65 'title' => esc_html__( 'Terms and conditions page', 'learnpress' ),
66 'id' => 'term_conditions_page_id',
67 'default' => '',
68 'type' => 'pages-dropdown',
69 'value' => learn_press_get_page_id( 'term_conditions' ),
70 ),
71 array(
72 'title' => esc_html__( 'Logout Redirect', 'learnpress' ),
73 'id' => 'logout_redirect_page_id',
74 'default' => '',
75 'type' => 'pages-dropdown',
76 'desc' => __( 'The page where the user will be redirected to after logging out.', 'learnpress' ),
77 'value' => learn_press_get_page_id( 'logout_redirect' ),
78 ),
79 array(
80 'type' => 'sectionend',
81 ),
82 array(
83 'title' => esc_html__( 'Currency', 'learnpress' ),
84 'type' => 'title',
85 'desc' => esc_html__( 'Setting up your currency unit and its formatting.', 'learnpress' ),
86 ),
87 array(
88 'title' => esc_html__( 'Currency', 'learnpress' ),
89 'id' => 'currency',
90 'default' => 'USD',
91 'type' => 'select',
92 'class' => 'lp-tom-select',
93 'custom_attributes' => [ 'data-struct' => htmlentities2( json_encode( $data_struct_currency ) ) ],
94 'options' => $currencies,
95 ),
96 array(
97 'title' => esc_html__( 'Currency position', 'learnpress' ),
98 'desc_tip' => esc_html__( 'This controls the position of the currency symbol.', 'learnpress' ),
99 'id' => 'currency_pos',
100 'default' => 'left',
101 'type' => 'select',
102 'options' => learn_press_currency_positions(),
103 ),
104 array(
105 'title' => esc_html__( 'Thousands separator', 'learnpress' ),
106 'desc_tip' => esc_html__( 'This sets the thousands separator of displayed prices.', 'learnpress' ),
107 'id' => 'thousands_separator',
108 'default' => ',',
109 'type' => 'text',
110 'css' => 'min-width: 50px; width: 50px;',
111 ),
112 array(
113 'title' => esc_html__( 'Decimal separator', 'learnpress' ),
114 'desc_tip' => esc_html__( 'This sets the decimal separator of displayed prices.', 'learnpress' ),
115 'id' => 'decimals_separator',
116 'default' => '.',
117 'type' => 'text',
118 'css' => 'min-width: 50px; width: 50px;',
119 ),
120 array(
121 'title' => esc_html__( 'The number of decimals', 'learnpress' ),
122 'desc_tip' => esc_html__( 'This sets the number of decimal points shown in the displayed prices.', 'learnpress' ),
123 'id' => 'number_of_decimals',
124 'default' => '2',
125 'type' => 'number',
126 'css' => 'width: 50px;',
127 ),
128 array(
129 'type' => 'sectionend',
130 ),
131 array(
132 'title' => esc_html__( 'Other', 'learnpress' ),
133 'type' => 'title',
134 ),
135 array(
136 'title' => esc_html__( 'Publish profile', 'learnpress' ),
137 'id' => 'publish_profile',
138 'default' => 'no',
139 'type' => 'checkbox',
140 'desc_tip' => esc_html__( 'This option will add a sub-item \"Privacy\" under the Setting tab on the Profile page. If users want to publish or hide their course, or quiz tab when other users visit their profile page, they need to enable/disable that option in the Privacy section.', 'learnpress' ),
141 'desc' => __( 'Public all user profile pages (only the overview tab).', 'learnpress' ),
142 ),
143 array(
144 'title' => esc_html__( 'Redirect Instructors to Course Builder', 'learnpress' ),
145 'desc' => esc_html__( 'When enabled, Instructors will be redirected to Course Builder when trying to access wp-admin. Administrators are not affected.', 'learnpress' ),
146 'id' => 'hide_instructor_access_admin_screen',
147 'default' => 'no',
148 'type' => 'checkbox',
149 ),
150 array(
151 'title' => esc_html__( 'Instructor registration', 'learnpress' ),
152 'desc' => esc_html__( 'Enable the option in all registration forms.', 'learnpress' ),
153 'id' => 'instructor_registration',
154 'default' => 'no',
155 'type' => 'checkbox',
156 ),
157 array(
158 'title' => esc_html__( 'Store IP Guest to handle checkout', 'learnpress' ),
159 'desc' => esc_html__( 'Enable the option, IP of client is identifier user instead $_COOKIE', 'learnpress' ),
160 'id' => 'store_ip_customer_session',
161 'default' => 'no',
162 'type' => 'checkbox',
163 ),
164 array(
165 'type' => 'sectionend',
166 ),
167 )
168 );
169