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 | inc/Services/CourseService.php +12 -0 4.4.04.4.8 View file →
@@ -31,8 +31,9 @@
31 31 }
32 32
33 33 /**
34 34 * Create course info main
35 + * Data of columns posts
35 36 *
36 37 * meta_input for metadata
37 38 *
38 39 * @param array $data [ 'post_title' => '', 'post_content' => '', 'post_status' => '', 'post_author' => , 'meta_input' => [] ]
@@ -360,6 +361,17 @@
360 361 LP_Debug::error_log( $e );
361 362 }
362 363
363 364 return $courses;
365 + }
366 +
367 + /**
368 + * Check item type is support of course
369 + *
370 + * @param string $item_type
371 + * @return bool
372 + */
373 + public static function check_is_item_type_of_course( string $item_type ): bool {
374 + $course_item_types = coursemodel::item_types_support();
375 + return in_array( $item_type, $course_item_types );
364 376 }
365 377 }