PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 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 All 139 releases
← All changes | config/settings/course.php +207 -48 4.1.6.9.34.4.8 View file →
@@ -4,12 +4,29 @@
4 4 */
5 5 $generate_course_thumbnail = get_option( 'learn_press_generate_course_thumbnail', 'no' );
6 6 $des_option_redirect_finish_course = wp_sprintf(
7 7 '%s<br>%s',
8 - esc_html__( 'The site will be redirected to the URL added after clicking finish course button.', 'learnpress' ),
8 + esc_html__( 'The site will be redirected to the URL added after clicking the finish course button.', 'learnpress' ),
9 9 esc_html__( 'Set blank, the site will be redirected to the single course page', 'learnpress' )
10 10 );
11 +$layout_single_course_default = LP_Settings::get_option( 'layout_single_course', '' );
12 +if ( empty( $layout_single_course_default ) ) {
13 + $layout_single_course_default = 'classic';
14 +}
11 15
16 +// Temporary hide fields for the Modern layout.
17 +add_filter(
18 + 'learn-press/course-settings-fields/curriculum',
19 + function ( $fields ) use ( $layout_single_course_default ) {
20 + if ( $layout_single_course_default === 'modern' ) {
21 + unset( $fields[2] );
22 + unset( $fields[3] );
23 + }
24 +
25 + return $fields;
26 + }
27 +);
28 +
12 29 return apply_filters(
13 30 'learn-press/courses-settings-fields',
14 31 array_merge(
15 32 apply_filters(
@@ -19,10 +36,21 @@
19 36 'title' => esc_html__( 'General', 'learnpress' ),
20 37 'type' => 'title',
21 38 ),
22 39 array(
40 + 'title' => esc_html__( 'Layout single course', 'learnpress' ),
41 + 'desc' => esc_html__( 'Layout default display for single course. (Not apply for theme Gutenberg)', 'learnpress' ),
42 + 'id' => 'layout_single_course',
43 + 'default' => $layout_single_course_default,
44 + 'type' => 'select',
45 + 'options' => array(
46 + 'modern' => esc_html__( 'Modern', 'learnpress' ),
47 + 'classic' => esc_html__( 'Classic', 'learnpress' ),
48 + ),
49 + ),
50 + array(
23 51 'title' => esc_html__( 'Review courses', 'learnpress' ),
24 - 'desc' => esc_html__( 'Courses created by instructors will be pending in review first.', 'learnpress' ),
52 + 'desc' => esc_html__( 'Courses created by instructors will be pending review first.', 'learnpress' ),
25 53 'id' => 'required_review',
26 54 'default' => 'yes',
27 55 'type' => 'checkbox',
28 56 ),
@@ -30,13 +58,13 @@
30 58 'title' => esc_html__( 'Auto start', 'learnpress' ),
31 59 'id' => 'auto_enroll',
32 60 'default' => 'yes',
33 61 'type' => 'checkbox',
34 - 'desc' => esc_html__( 'Students will get started courses immediately after successfully purchased.', 'learnpress' ),
62 + 'desc' => esc_html__( 'Students will get started on courses immediately after successfully purchasing them.', 'learnpress' ),
35 63 ),
36 64 array(
37 - 'title' => __( 'Enable confirmation popup finish course, complete item', 'learnpress' ),
38 - 'desc' => __( 'Show confirmation popup before finishing course or completing item.', 'learnpress' ),
65 + 'title' => __( 'Confirmation popup', 'learnpress' ),
66 + 'desc' => __( 'Show a confirmation popup before finishing the course or completing the item.', 'learnpress' ),
39 67 'id' => 'enable_popup_confirm_finish',
40 68 'default' => 'yes',
41 69 'type' => 'checkbox',
42 70 ),
@@ -41,9 +69,9 @@
41 69 'type' => 'checkbox',
42 70 ),
43 71 array(
44 72 'title' => esc_html__( 'Archive page layout', 'learnpress' ),
45 - 'desc' => esc_html__( 'Type display list course on Course Archive page', 'learnpress' ),
73 + 'desc' => esc_html__( 'Display the List course type on the Course Archive page.', 'learnpress' ),
46 74 'id' => 'archive_courses_layout',
47 75 'default' => 'list',
48 76 'type' => 'select',
49 77 'options' => learn_press_courses_layouts(),
@@ -49,9 +77,9 @@
49 77 'options' => learn_press_courses_layouts(),
50 78 ),
51 79 array(
52 80 'title' => esc_html__( 'Courses per page', 'learnpress' ),
53 - 'desc' => esc_html__( 'Number of courses displayed per page.', 'learnpress' ),
81 + 'desc' => esc_html__( 'The number of displayed courses per page.', 'learnpress' ),
54 82 'id' => 'archive_course_limit',
55 83 'default' => '8',
56 84 'type' => 'number',
57 85 'custom_attributes' => array(
@@ -56,20 +84,28 @@
56 84 'type' => 'number',
57 85 'custom_attributes' => array(
58 86 'min' => '1',
59 87 ),
60 - 'css' => 'min-width: 50px; width: 50px;',
88 + 'css' => 'min-width: 70px; width: 70px;',
61 89 ),
62 90 array(
63 - 'title' => esc_html__( 'Enable loading ajax Courses on the Course Archive page', 'learnpress' ),
64 - 'desc' => __( 'On/Off <i>loading ajax Courses</i>', 'learnpress' ),
91 + 'title' => esc_html__( 'Include courses in subcategory', 'learnpress' ),
92 + 'desc' => esc_html__( 'Show all courses within the subcategory that have not been chosen in the parent category.', 'learnpress' ),
93 + 'id' => 'get_courses_of_subcategory',
94 + 'default' => 'no',
95 + 'type' => 'checkbox',
96 + 'css' => 'min-width: 50px; width: 50px;',
97 + ),
98 + array(
99 + 'title' => esc_html__( 'Loading ajax Courses', 'learnpress' ),
100 + 'desc' => __( 'On/Off <i>loading ajax courses on the Course Archive page </i>.', 'learnpress' ),
65 101 'id' => 'courses_load_ajax',
66 102 'default' => 'yes',
67 103 'type' => 'checkbox',
68 104 ),
69 105 array(
70 - 'title' => esc_html__( 'Not run Ajax when reloading Course Archive page', 'learnpress' ),
71 - 'desc' => esc_html__( 'Ajax is only applied when selecting pagination, filtering, searching and sorting. Not applicable when reloading Course Archive page.', 'learnpress' ),
106 + 'title' => esc_html__( 'Do not run Ajax when reloading the Course Archive page', 'learnpress' ),
107 + 'desc' => esc_html__( 'Ajax is only applied when selecting pagination, filtering, searching, and sorting. Not applicable when reloading the Course Archive page.', 'learnpress' ),
72 108 'id' => 'courses_first_no_ajax',
73 109 'default' => 'no',
74 110 'type' => 'checkbox',
75 111 'show_if_checked' => 'courses_load_ajax',
@@ -74,8 +110,21 @@
74 110 'type' => 'checkbox',
75 111 'show_if_checked' => 'courses_load_ajax',
76 112 ),
77 113 array(
114 + 'title' => esc_html__( 'Pagination Type', 'learnpress' ),
115 + 'desc' => esc_html__( 'Display the pagination type on the Course Archive page.', 'learnpress' ),
116 + 'id' => 'course_pagination_type',
117 + 'default' => 'standard',
118 + 'type' => 'select',
119 + 'options' => array(
120 + 'number' => esc_html__( 'Number', 'learnpress' ),
121 + 'load-more' => esc_html__( 'Load More', 'learnpress' ),
122 + 'infinite' => esc_html__( 'Infinite Scroll', 'learnpress' ),
123 + ),
124 + 'show_if_checked' => 'courses_load_ajax',
125 + ),
126 + array(
78 127 'title' => esc_html__( 'Thumbnail dimensions', 'learnpress' ),
79 128 'id' => 'course_thumbnail_dimensions',
80 129 'default' => array( 500, 300, 'yes' ),
81 130 'type' => 'image-dimensions',
@@ -80,13 +129,13 @@
80 129 'default' => array( 500, 300, 'yes' ),
81 130 'type' => 'image-dimensions',
82 131 ),
83 132 array(
84 - 'title' => esc_html__( 'Redirect when finish course', 'learnpress' ),
133 + 'title' => esc_html__( 'Redirect when finishing the course', 'learnpress' ),
85 134 'id' => 'course_finish_redirect',
86 135 'default' => '',
87 136 'type' => 'url',
88 - 'placeholder' => 'https://learnpress.com/',
137 + 'placeholder' => 'https://learnpresslms.com/',
89 138 'desc' => $des_option_redirect_finish_course,
90 139 ),
91 140 array(
92 141 'type' => 'sectionend',
@@ -101,20 +150,34 @@
101 150 'title' => esc_html__( 'Curriculum Settings', 'learnpress' ),
102 151 'id' => 'lp_metabox_curriculum_setting',
103 152 ),
104 153 array(
154 + 'title' => esc_html__( 'Curriculum display', 'learnpress' ),
155 + 'id' => 'curriculum_display',
156 + 'default' => 'expand_first_section',
157 + 'type' => 'select',
158 + 'options' => array(
159 + 'expand_first_section' => esc_html__( 'Expand first section', 'learnpress' ),
160 + 'expand_all' => esc_html__( 'Expand all sections', 'learnpress' ),
161 + 'collapse_all' => esc_html__( 'Collapse all sections', 'learnpress' ),
162 + ),
163 + 'desc' => esc_html__( 'Currently, apply for the Modern single course layout only.', 'learnpress' ),
164 + ),
165 + array(
105 166 'title' => esc_html__( 'Section Per Page', 'learnpress' ),
106 167 'id' => 'section_per_page',
107 - 'default' => 1,
168 + 'default' => -1,
108 169 'type' => 'number',
109 - 'desc' => esc_html__( 'Number of sections displayed per page ( Enter -1 for display all sections).', 'learnpress' ),
170 + 'min' => '-1',
171 + 'desc' => esc_html__( 'The number of displayed sections per page (Enter -1 to display all sections).', 'learnpress' ),
110 172 ),
111 173 array(
112 174 'title' => esc_html__( 'Course Item Per Page', 'learnpress' ),
113 175 'id' => 'course_item_per_page',
114 - 'default' => 10,
176 + 'default' => -1,
115 177 'type' => 'number',
116 - 'desc' => esc_html__( 'Number of course items displayed per page in section ( Enter -1 for display all course items).', 'learnpress' ),
178 + 'min' => '-1',
179 + 'desc' => esc_html__( 'The number of displayed course items per page in a section (Enter -1 to display all course items).', 'learnpress' ),
117 180 ),
118 181 array(
119 182 'type' => 'sectionend',
120 183 'id' => 'lp_metabox_curriculum_setting',
@@ -121,54 +184,150 @@
121 184 ),
122 185 )
123 186 ),
124 187 apply_filters(
125 - 'learn-press/course-settings-fields/single',
188 + 'learn-press/course-settings-fields/quiz',
126 189 array(
127 190 array(
128 - 'title' => esc_html__( 'Permalinks', 'learnpress' ),
129 191 'type' => 'title',
192 + 'title' => esc_html__( 'Quiz Settings', 'learnpress' ),
193 + 'id' => 'lp_metabox_setting_quiz',
130 194 ),
131 195 array(
132 - 'title' => esc_html__( 'Course', 'learnpress' ),
133 - 'type' => 'course-permalink',
134 - 'default' => '',
135 - 'id' => 'course_base',
196 + 'title' => esc_html__( 'Sticky Quiz Paging', 'learnpress' ),
197 + 'id' => 'navigation_position',
198 + 'default' => 'yes',
199 + 'type' => 'checkbox',
200 + 'desc' => esc_html__( 'The question\'s navigation position is sticky. If this option is disabled, the question navigation position will be below the quiz content', 'learnpress' ),
136 201 ),
137 202 array(
138 - 'title' => esc_html__( 'Lesson', 'learnpress' ),
139 - 'type' => 'text',
140 - 'id' => 'lesson_slug',
141 - 'desc' => sprintf( 'e.g. %s/course/sample-course/<code>lessons</code>/sample-lesson/', home_url() ),
142 - 'default' => 'lessons',
143 - 'placeholder' => 'lesson',
203 + 'type' => 'sectionend',
204 + 'id' => 'lp_metabox_setting_quiz',
144 205 ),
206 + )
207 + ),
208 + apply_filters(
209 + 'learn-press/course-settings-fields/material',
210 + array(
145 211 array(
146 - 'title' => esc_html__( 'Quiz', 'learnpress' ),
147 - 'type' => 'text',
148 - 'id' => 'quiz_slug',
149 - 'desc' => sprintf( 'e.g. %s/course/sample-course/<code>quizzes</code>/sample-quiz/', home_url() ),
150 - 'default' => 'quizzes',
151 - 'placeholder' => 'quizzes',
212 + 'type' => 'title',
213 + 'title' => esc_html__( 'Material Settings', 'learnpress' ),
214 + 'id' => 'lp_course_material_setting',
152 215 ),
153 216 array(
154 - 'title' => esc_html__( 'Category base', 'learnpress' ),
155 - 'id' => 'course_category_base',
156 - 'default' => 'course-category',
157 - 'type' => 'text',
158 - 'placeholder' => 'course-category',
159 - 'desc' => sprintf( 'e.g. %s/course/%s/sample-course/', home_url(), '<code>course-category</code>' ),
217 + 'title' => esc_html__( 'File Type', 'learnpress' ),
218 + 'id' => 'material_allow_file_type',
219 + 'type' => 'multiselect',
220 + 'is_optgroup' => '1',
221 + 'class' => 'lp-tom-select',
222 + 'default' => array( 'pdf', 'txt' ),
223 + 'desc' => esc_html__( 'Which types of file will be allowed uploading?', 'learnpress' ),
224 + 'options' => array(
225 + 'document' => array(
226 + 'txt' => '.txt(text/plain)',
227 + 'doc,docx' => '.doc, .docx (Microsoft Word)',
228 + 'pdf' => '.pdf (Portable Document Format)',
229 + ),
230 + 'image' => array(
231 + 'jpg,jpeg' => '.jpg, .jpeg (Joint Photographic Experts Group)',
232 + 'png' => '.png (Portable Network Graphics)',
233 + 'gif' => '.gif (Graphics Interchange Format)',
234 + 'bmp' => '.bmp (Bitmap)',
235 + ),
236 + 'audio' => array(
237 + 'mp3' => '.mp3 (MPEG Audio Layer 3)',
238 + 'wav' => '.wav (Waveform Audio File Format)',
239 + 'wma' => '.wma (Windows Media Audio)',
240 + ),
241 + 'video' => array(
242 + 'mp4' => '.mp4 (MPEG-4 Part 14)',
243 + 'avi' => '.avi (Audio Video Interleave)',
244 + 'mov' => '.mov (QuickTime Movie)',
245 + 'wmv' => '.wmv (Windows Media Video)',
246 + ),
247 + 'spreadsheet' => array(
248 + 'xls,xlsx' => '.xls, .xlsx (Microsoft Excel)',
249 + 'ods' => '.ods (OpenDocument Spreadsheet)',
250 + 'csv' => '.csv (Comma-Separated Values)',
251 + 'numbers' => '.numbers (Apple Numbers)',
252 + 'tsv' => '.tsv (Tab-Separated Values)',
253 + ),
254 + 'compressed archive' => array(
255 + 'zip' => 'ZIP archive',
256 + ),
257 + ),
258 + 'custom_attributes' => array(
259 + 'required' => '1',
260 + ),
160 261 ),
161 262 array(
162 - 'title' => esc_html__( 'Tag base', 'learnpress' ),
163 - 'id' => 'course_tag_base',
164 - 'default' => 'course-tag',
165 - 'type' => 'text',
166 - 'placeholder' => 'course-tag',
167 - 'desc' => sprintf( 'e.g. %s/course/%s/sample-course/', home_url(), '<code>course-tag</code>' ),
263 + 'title' => esc_html__( 'Upload Files', 'learnpress' ),
264 + 'id' => 'material_upload_files',
265 + 'default' => 2,
266 + 'type' => 'number',
267 + 'desc' => esc_html__( 'Number files the user can upload. Set to 0 to disable', 'learnpress' ),
268 + 'custom_attributes' => array(
269 + 'min' => '0',
270 + ),
168 271 ),
169 272 array(
273 + 'title' => esc_html__( 'File Size Limit', 'learnpress' ),
274 + 'id' => 'material_max_file_size',
275 + 'default' => 2,
276 + 'type' => 'number',
277 + 'desc' => esc_html__( 'Set Maximum Attachment size for upload (MB)', 'learnpress' ),
278 + 'custom_attributes' => array(
279 + 'min' => '1',
280 + ),
281 + ),
282 + array(
283 + 'title' => esc_html__( 'File Per Page', 'learnpress' ),
284 + 'id' => 'material_file_per_page',
285 + 'default' => -1,
286 + 'type' => 'number',
287 + 'desc' => esc_html__( 'The number of displayed files per page (Enter -1 to display all files, set to 0 to disable).', 'learnpress' ),
288 + 'custom_attributes' => array(
289 + 'min' => '-1',
290 + ),
291 + ),
292 + array(
293 + 'title' => esc_html__( 'Url nofollow', 'learnpress' ),
294 + 'desc' => esc_html__( 'Add rel="nofollow" to material external link.', 'learnpress' ),
295 + 'id' => 'material_url_nofollow',
296 + 'default' => 'yes',
297 + 'type' => 'checkbox',
298 + ),
299 + array(
170 300 'type' => 'sectionend',
301 + 'id' => 'lp_course_material_setting',
302 + ),
303 + )
304 + ),
305 + apply_filters(
306 + 'learn-press/course-settings-fields/instructor',
307 + array(
308 + array(
309 + 'type' => 'title',
310 + 'title' => esc_html__( 'Instructor Settings', 'learnpress' ),
311 + 'id' => 'lp_metabox_instructor_setting',
312 + ),
313 + array(
314 + 'title' => esc_html__( 'Instructor Per Page', 'learnpress' ),
315 + 'id' => 'instructor_per_page',
316 + 'default' => 12,
317 + 'type' => 'number',
318 + 'desc' => esc_html__( 'The number of displayed instructors per page (Enter -1 to display all sections).', 'learnpress' ),
319 + ),
320 + array(
321 + 'title' => esc_html__( 'Show Admin on list', 'learnpress' ),
322 + 'id' => 'show_admin_on_list_instructors',
323 + 'default' => 'yes',
324 + 'type' => 'checkbox',
325 + 'desc' => esc_html__( 'Show author Admin on list instructors.', 'learnpress' ),
326 + ),
327 + array(
328 + 'type' => 'sectionend',
329 + 'id' => 'lp_metabox_instructor_setting',
171 330 ),
172 331 )
173 332 )
174 333 )