| @@ -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 | } |