PluginProbe ʕ •ᴥ•ʔ
Tutor LMS – eLearning and online course solution / 2.1.3
Tutor LMS – eLearning and online course solution v2.1.3
3.9.14 3.9.13 3.9.12 3.9.11 trunk 1.0.0 1.0.0-alpha 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.2.0 1.2.1 1.2.11 1.2.12 1.2.13 1.2.20 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.1 1.8.10 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.1 1.9.10 1.9.11 1.9.12 1.9.13 1.9.14 1.9.15 1.9.16 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.10 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.10 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.3.0 2.4.0 2.5.0 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 3.0.0 3.0.1 3.0.2 3.1.0 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0 3.8.1 3.8.2 3.8.3 3.9.0 3.9.1 3.9.10 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9
tutor / classes / Post_types.php
tutor / classes Last commit date
Addons.php 3 years ago Admin.php 3 years ago Ajax.php 3 years ago Announcements.php 3 years ago Assets.php 3 years ago Backend_Page_Trait.php 3 years ago Course.php 3 years ago Course_Embed.php 3 years ago Course_Filter.php 3 years ago Course_List.php 3 years ago Course_Settings_Tabs.php 3 years ago Course_Widget.php 3 years ago Custom_Validation.php 3 years ago Dashboard.php 3 years ago FormHandler.php 3 years ago Frontend.php 3 years ago Gutenberg.php 3 years ago Input.php 3 years ago Instructor.php 3 years ago Instructors_List.php 3 years ago Lesson.php 3 years ago Options_V2.php 3 years ago Post_types.php 3 years ago Private_Course_Access.php 3 years ago Q_and_A.php 3 years ago Question_Answers_List.php 3 years ago Quiz.php 3 years ago Quiz_Attempts_List.php 3 years ago RestAPI.php 3 years ago Reviews.php 3 years ago Rewrite_Rules.php 4 years ago Shortcode.php 3 years ago Student.php 4 years ago Students_List.php 4 years ago Taxonomies.php 4 years ago Template.php 3 years ago Theme_Compatibility.php 5 years ago Tools.php 3 years ago Tools_V2.php 4 years ago Tutor.php 3 years ago TutorEDD.php 4 years ago Tutor_Base.php 5 years ago Tutor_List_Table.php 3 years ago Tutor_Setup.php 3 years ago Upgrader.php 4 years ago User.php 4 years ago Utils.php 3 years ago Video_Stream.php 4 years ago Withdraw.php 3 years ago Withdraw_Requests_List.php 3 years ago WooCommerce.php 3 years ago
Post_types.php
513 lines
1 <?php
2 /**
3 * Register post types
4 *
5 * @package Tutor\PostTypes
6 * @category PostTypes
7 * @author Themeum <support@themeum.com>
8 * @link https://themeum.com
9 * @since 1.0.0
10 */
11
12 namespace TUTOR;
13
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit;
16 }
17 /**
18 * Register Tutor's post types
19 *
20 * @since 1.0.0
21 */
22 class Post_types {
23
24 /**
25 * Course post type
26 *
27 * @since 1.0.0
28 *
29 * @var string
30 */
31 public $course_post_type;
32
33 /**
34 * Lesson post type
35 *
36 * @since 1.0.0
37 *
38 * @var string
39 */
40 public $lesson_post_type;
41
42 /**
43 * Register hooks
44 *
45 * @since 1.0.0
46 */
47 public function __construct() {
48 $this->course_post_type = tutor()->course_post_type;
49 $this->lesson_post_type = tutor()->lesson_post_type;
50
51 add_action( 'init', array( $this, 'register_course_post_types' ) );
52 add_action( 'init', array( $this, 'register_lesson_post_types' ) );
53 add_action( 'init', array( $this, 'register_quiz_post_types' ) );
54 add_action( 'init', array( $this, 'register_topic_post_types' ) );
55 add_action( 'init', array( $this, 'register_assignments_post_types' ) );
56
57 add_filter( 'gutenberg_can_edit_post_type', array( $this, 'gutenberg_can_edit_post_type' ), 10, 2 );
58 add_filter( 'use_block_editor_for_post_type', array( $this, 'gutenberg_can_edit_post_type' ), 10, 2 );
59
60 /**
61 * Customize the message of course
62 */
63 add_filter( 'post_updated_messages', array( $this, 'course_updated_messages' ) );
64
65 /**
66 * Since 1.4.0
67 */
68 add_action( 'init', array( $this, 'register_tutor_enrolled_post_types' ) );
69
70 /**
71 * Remove tutor course post type from admin menu
72 *
73 * @since v2.0.0
74 */
75 add_action( 'admin_menu', array( $this, 'remove_course_post_menu' ) );
76 }
77
78 /**
79 * Register course post type
80 *
81 * @since 1.0.0
82 *
83 * @return void
84 */
85 public function register_course_post_types() {
86 $course_post_type = $this->course_post_type;
87 $courses_base_slug = apply_filters( 'tutor_courses_base_slug', $course_post_type );
88
89 $labels = array(
90 'name' => _x( 'Courses', 'post type general name', 'tutor' ),
91 'singular_name' => _x( 'Course', 'post type singular name', 'tutor' ),
92 'menu_name' => _x( 'Courses', 'admin menu', 'tutor' ),
93 'name_admin_bar' => _x( 'Course', 'add new on admin bar', 'tutor' ),
94 'add_new' => _x( 'Add New', 'tutor course add', 'tutor' ),
95 'add_new_item' => __( 'Add New Course', 'tutor' ),
96 'new_item' => __( 'New Course', 'tutor' ),
97 'edit_item' => __( 'Edit Course', 'tutor' ),
98 'view_item' => __( 'View Course', 'tutor' ),
99 'all_items' => __( 'Courses', 'tutor' ),
100 'search_items' => __( 'Search Courses', 'tutor' ),
101 'parent_item_colon' => __( 'Parent Courses:', 'tutor' ),
102 'not_found' => __( 'No courses found.', 'tutor' ),
103 'not_found_in_trash' => __( 'No courses found in Trash.', 'tutor' ),
104 );
105
106 $args = array(
107 'labels' => $labels,
108 'description' => __( 'Description.', 'tutor' ),
109 'public' => true,
110 'publicly_queryable' => true,
111 // 'show_ui' => true,
112 // 'show_in_menu' => 'tutor',
113 'query_var' => true,
114 'rewrite' => array(
115 'slug' => tutor_utils()->get_option( 'course_permalink_base', tutor()->course_post_type ),
116 'with_front' => false,
117 ),
118 'menu_icon' => 'dashicons-book-alt',
119 'capability_type' => 'post',
120 'has_archive' => true,
121 'hierarchical' => false,
122 'menu_position' => null,
123 'taxonomies' => array( 'course-category', 'course-tag' ),
124 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'author' ),
125 'show_in_rest' => true,
126
127 'capabilities' => array(
128 'edit_post' => 'edit_tutor_course',
129 'read_post' => 'read_tutor_course',
130 'delete_post' => 'delete_tutor_course',
131 'delete_posts' => 'delete_tutor_courses',
132 'edit_posts' => 'edit_tutor_courses',
133 'edit_others_posts' => 'edit_others_tutor_courses',
134 'publish_posts' => 'publish_tutor_courses',
135 'read_private_posts' => 'read_private_tutor_courses',
136 'create_posts' => 'edit_tutor_courses',
137 ),
138 );
139
140 register_post_type( $course_post_type, $args );
141
142 /**
143 * Taxonomy
144 */
145 $labels = array(
146 'name' => _x( 'Course Categories', 'taxonomy general name', 'tutor' ),
147 'singular_name' => _x( 'Category', 'taxonomy singular name', 'tutor' ),
148 'search_items' => __( 'Search Categories', 'tutor' ),
149 'popular_items' => __( 'Popular Categories', 'tutor' ),
150 'all_items' => __( 'All Categories', 'tutor' ),
151 'parent_item' => null,
152 'parent_item_colon' => null,
153 'edit_item' => __( 'Edit Category', 'tutor' ),
154 'update_item' => __( 'Update Category', 'tutor' ),
155 'add_new_item' => __( 'Add New Category', 'tutor' ),
156 'new_item_name' => __( 'New Category Name', 'tutor' ),
157 'separate_items_with_commas' => __( 'Separate categories with commas', 'tutor' ),
158 'add_or_remove_items' => __( 'Add or remove categories', 'tutor' ),
159 'choose_from_most_used' => __( 'Choose from the most used categories', 'tutor' ),
160 'not_found' => __( 'No categories found.', 'tutor' ),
161 'menu_name' => __( 'Course Categories', 'tutor' ),
162 );
163
164 $args = array(
165 'hierarchical' => true,
166 'labels' => $labels,
167 'show_ui' => true,
168 'show_admin_column' => true,
169 'update_count_callback' => '_update_post_term_count',
170 'query_var' => true,
171 'show_in_rest' => true,
172 'rewrite' => array( 'slug' => 'course-category' ),
173 );
174
175 register_taxonomy( 'course-category', $this->course_post_type, $args );
176
177 $labels = array(
178 'name' => _x( 'Tags', 'taxonomy general name', 'tutor' ),
179 'singular_name' => _x( 'Tag', 'taxonomy singular name', 'tutor' ),
180 'search_items' => __( 'Search Tags', 'tutor' ),
181 'popular_items' => __( 'Popular Tags', 'tutor' ),
182 'all_items' => __( 'All Tags', 'tutor' ),
183 'parent_item' => null,
184 'parent_item_colon' => null,
185 'edit_item' => __( 'Edit Tag', 'tutor' ),
186 'update_item' => __( 'Update Tag', 'tutor' ),
187 'add_new_item' => __( 'Add New Tag', 'tutor' ),
188 'new_item_name' => __( 'New Tag Name', 'tutor' ),
189 'separate_items_with_commas' => __( 'Separate Tags with commas', 'tutor' ),
190 'add_or_remove_items' => __( 'Add or remove Tags', 'tutor' ),
191 'choose_from_most_used' => __( 'Choose from the most used Tags', 'tutor' ),
192 'not_found' => __( 'No Tags found.', 'tutor' ),
193 'menu_name' => __( 'Tags', 'tutor' ),
194 );
195
196 $args = array(
197 'hierarchical' => false,
198 'labels' => $labels,
199 'show_ui' => true,
200 'show_admin_column' => true,
201 'update_count_callback' => '_update_post_term_count',
202 'query_var' => true,
203 'show_in_rest' => true,
204 'rewrite' => array( 'slug' => 'course-tag' ),
205 );
206
207 register_taxonomy( 'course-tag', $this->course_post_type, $args );
208 }
209
210 /**
211 * Register lesson post type
212 *
213 * @since 1.0.0
214 *
215 * @return void
216 */
217 public function register_lesson_post_types() {
218 $lesson_post_type = $this->lesson_post_type;
219 $lesson_base_slug = apply_filters( 'tutor_lesson_base_slug', $lesson_post_type );
220
221 $labels = array(
222 'name' => _x( 'Lessons', 'post type general name', 'tutor' ),
223 'singular_name' => _x( 'Lesson', 'post type singular name', 'tutor' ),
224 'menu_name' => _x( 'Lessons', 'admin menu', 'tutor' ),
225 'name_admin_bar' => _x( 'Lesson', 'add new on admin bar', 'tutor' ),
226 'add_new' => _x( 'Add New', 'tutor lesson add', 'tutor' ),
227 'add_new_item' => __( 'Add New Lesson', 'tutor' ),
228 'new_item' => __( 'New Lesson', 'tutor' ),
229 'edit_item' => __( 'Edit Lesson', 'tutor' ),
230 'view_item' => __( 'View Lesson', 'tutor' ),
231 'all_items' => __( 'Lessons', 'tutor' ),
232 'search_items' => __( 'Search Lessons', 'tutor' ),
233 'parent_item_colon' => __( 'Parent Lessons:', 'tutor' ),
234 'not_found' => __( 'No lessons found.', 'tutor' ),
235 'not_found_in_trash' => __( 'No lessons found in Trash.', 'tutor' ),
236 );
237
238 $args = array(
239 'labels' => $labels,
240 'description' => __( 'Description.', 'tutor' ),
241 'public' => true,
242 'publicly_queryable' => true,
243 'show_ui' => true,
244 'show_in_menu' => false,
245 'query_var' => true,
246 'rewrite' => array( 'slug' => $lesson_base_slug ),
247 'menu_icon' => 'dashicons-list-view',
248 'capability_type' => 'post',
249 'has_archive' => true,
250 'hierarchical' => false,
251 'menu_position' => null,
252 'supports' => array( 'title', 'editor', 'comments' ),
253 'exclude_from_search' => apply_filters( 'tutor_lesson_exclude_from_search', true ),
254 'capabilities' => array(
255 'edit_post' => 'edit_tutor_lesson',
256 'read_post' => 'read_tutor_lesson',
257 'delete_post' => 'delete_tutor_lesson',
258 'delete_posts' => 'delete_tutor_lessons',
259 'edit_posts' => 'edit_tutor_lessons',
260 'edit_others_posts' => 'edit_others_tutor_lessons',
261 'publish_posts' => 'publish_tutor_lessons',
262 'read_private_posts' => 'read_private_tutor_lessons',
263 'create_posts' => 'edit_tutor_lessons',
264 ),
265 );
266
267 register_post_type( $lesson_post_type, $args );
268 }
269
270 /**
271 * Register quiz post type
272 *
273 * @since 1.0.0
274 *
275 * @return void
276 */
277 public function register_quiz_post_types() {
278 $labels = array(
279 'name' => _x( 'Quizzes', 'post type general name', 'tutor' ),
280 'singular_name' => _x( 'Quiz', 'post type singular name', 'tutor' ),
281 'menu_name' => _x( 'Quizzes', 'admin menu', 'tutor' ),
282 'name_admin_bar' => _x( 'Quiz', 'add new on admin bar', 'tutor' ),
283 'add_new' => _x( 'Add New', 'tutor quiz add', 'tutor' ),
284 'add_new_item' => __( 'Add New Quiz', 'tutor' ),
285 'new_item' => __( 'New Quiz', 'tutor' ),
286 'edit_item' => __( 'Edit Quiz', 'tutor' ),
287 'view_item' => __( 'View Quiz', 'tutor' ),
288 'all_items' => __( 'Quizzes', 'tutor' ),
289 'search_items' => __( 'Search Quizzes', 'tutor' ),
290 'parent_item_colon' => __( 'Parent Quizzes:', 'tutor' ),
291 'not_found' => __( 'No quizzes found.', 'tutor' ),
292 'not_found_in_trash' => __( 'No quizzes found in Trash.', 'tutor' ),
293 );
294
295 $args = array(
296 'labels' => $labels,
297 'description' => __( 'Description.', 'tutor' ),
298 'public' => true,
299 'publicly_queryable' => true,
300 'show_ui' => false,
301 'show_in_menu' => 'tutor',
302 'query_var' => true,
303 'rewrite' => array( 'slug' => $this->lesson_post_type ),
304 'menu_icon' => 'dashicons-editor-help',
305 'capability_type' => 'post',
306 'has_archive' => true,
307 'hierarchical' => false,
308 'menu_position' => null,
309 'supports' => array( 'title', 'editor' ),
310 'exclude_from_search' => apply_filters( 'tutor_quiz_exclude_from_search', true ),
311 'capabilities' => array(
312 'edit_post' => 'edit_tutor_quiz',
313 'read_post' => 'read_tutor_quiz',
314 'delete_post' => 'delete_tutor_quiz',
315 'delete_posts' => 'delete_tutor_quizzes',
316 'edit_posts' => 'edit_tutor_quizzes',
317 'edit_others_posts' => 'edit_others_tutor_quizzes',
318 'publish_posts' => 'publish_tutor_quizzes',
319 'read_private_posts' => 'read_private_tutor_quizzes',
320 'create_posts' => 'edit_tutor_quizzes',
321 ),
322 );
323
324 register_post_type( 'tutor_quiz', $args );
325 }
326
327 /**
328 * Register topic post type
329 *
330 * @since 1.0.0
331 *
332 * @return void
333 */
334 public function register_topic_post_types() {
335 $args = array(
336 'label' => 'Topics',
337 'description' => __( 'Description.', 'tutor' ),
338 'public' => false,
339 'publicly_queryable' => false,
340 'show_ui' => false,
341 'query_var' => false,
342 'has_archive' => false,
343 'hierarchical' => false,
344 'menu_position' => null,
345 );
346 register_post_type( 'topics', $args );
347 }
348
349 /**
350 * Register assignment post type
351 *
352 * @since 1.0.0
353 *
354 * @return void
355 */
356 public function register_assignments_post_types() {
357 $labels = array(
358 'name' => _x( 'Assignments', 'post type general name', 'tutor' ),
359 'singular_name' => _x( 'Assignment', 'post type singular name', 'tutor' ),
360 'menu_name' => _x( 'Assignments', 'admin menu', 'tutor' ),
361 'name_admin_bar' => _x( 'Assignment', 'add new on admin bar', 'tutor' ),
362 'add_new' => _x( 'Add New', 'tutor assignment add', 'tutor' ),
363 'add_new_item' => __( 'Add New Assignment', 'tutor' ),
364 'new_item' => __( 'New Assignment', 'tutor' ),
365 'edit_item' => __( 'Edit Assignment', 'tutor' ),
366 'view_item' => __( 'View Assignment', 'tutor' ),
367 'all_items' => __( 'Assignments', 'tutor' ),
368 'search_items' => __( 'Search Assignments', 'tutor' ),
369 'parent_item_colon' => __( 'Parent Assignments:', 'tutor' ),
370 'not_found' => __( 'No Assignments found.', 'tutor' ),
371 'not_found_in_trash' => __( 'No Assignments found in Trash.', 'tutor' ),
372 );
373
374 $args = array(
375 'labels' => $labels,
376 'description' => __( 'Description.', 'tutor' ),
377 'public' => true,
378 'publicly_queryable' => true,
379 'show_ui' => false,
380 'show_in_menu' => 'tutor',
381 'query_var' => true,
382 'rewrite' => array( 'slug' => $this->lesson_post_type ),
383 'menu_icon' => 'dashicons-editor-help',
384 'capability_type' => 'post',
385 'has_archive' => true,
386 'hierarchical' => false,
387 'menu_position' => null,
388 'supports' => array( 'title', 'editor' ),
389 'exclude_from_search' => apply_filters( 'tutor_assignment_exclude_from_search', true ),
390 'capabilities' => array(
391 'edit_post' => 'edit_tutor_assignment',
392 'read_post' => 'read_tutor_assignment',
393 'delete_post' => 'delete_tutor_assignment',
394 'delete_posts' => 'delete_tutor_assignments',
395 'edit_posts' => 'edit_tutor_assignments',
396 'edit_others_posts' => 'edit_others_tutor_assignments',
397 'publish_posts' => 'publish_tutor_assignments',
398 'read_private_posts' => 'read_private_tutor_assignments',
399 'create_posts' => 'edit_tutor_assignments',
400 ),
401 );
402
403 register_post_type( 'tutor_assignments', $args );
404 }
405
406 /**
407 * Course update messages
408 *
409 * @since 1.0.0
410 *
411 * @param array $messages messages.
412 *
413 * @return mixed
414 */
415 public function course_updated_messages( $messages ) {
416 $post = get_post();
417 $post_type = get_post_type( $post );
418 $post_type_object = get_post_type_object( $post_type );
419
420 $course_post_type = tutor()->course_post_type;
421
422 $revision = Input::get( 'revision' );
423 $revision_msg = __( 'Course restored to revision from ', 'tutor' );
424 if ( ! is_null( $revision ) ) {
425 $revision_msg .= wp_post_revision_title( $revision );
426 } else {
427 $revision_msg = false;
428 }
429
430 $schedule_date = date_i18n( __( 'M j, Y @ G:i', 'tutor' ), strtotime( $post->post_date ) );
431 $schedule_msg = __( 'Course scheduled for:', 'tutor' );
432 $schedule_msg .= ' <strong> ' . $schedule_date . ' </strong>';
433
434 $messages[ $course_post_type ] = array(
435 0 => '', // Unused. Messages start at index 1.
436 1 => __( 'Course updated.', 'tutor' ),
437 2 => __( 'Custom field updated.', 'tutor' ),
438 3 => __( 'Custom field deleted.', 'tutor' ),
439 4 => __( 'Course updated.', 'tutor' ),
440 5 => $revision_msg,
441 6 => __( 'Course published.', 'tutor' ),
442 7 => __( 'Course saved.', 'tutor' ),
443 8 => __( 'Course submitted.', 'tutor' ),
444 9 => $schedule_msg,
445 10 => __( 'Course draft updated.', 'tutor' ),
446 );
447
448 if ( $post_type_object->publicly_queryable && $course_post_type === $post_type ) {
449 $permalink = get_permalink( $post->ID );
450
451 $view_link = sprintf( ' <a href="%s">%s</a>', esc_url( $permalink ), __( 'View course', 'tutor' ) );
452 $messages[ $post_type ][1] .= $view_link;
453 $messages[ $post_type ][6] .= $view_link;
454 $messages[ $post_type ][9] .= $view_link;
455
456 $preview_permalink = add_query_arg( 'preview', 'true', $permalink );
457 $preview_link = sprintf( ' <a target="_blank" href="%s">%s</a>', esc_url( $preview_permalink ), __( 'Preview course', 'tutor' ) );
458 $messages[ $post_type ][8] .= $preview_link;
459 $messages[ $post_type ][10] .= $preview_link;
460 }
461
462 return $messages;
463 }
464
465 /**
466 * Gutenberg can edit post filter handler
467 *
468 * @since 1.0.0
469 *
470 * @param bool $can_edit use block editor.
471 * @param string $post_type post type.
472 *
473 * @return bool
474 *
475 * Enable / Disable Gutenberg Editor
476 * @since v.1.3.4
477 */
478 public function gutenberg_can_edit_post_type( $can_edit, $post_type ) {
479 $enable_gutenberg = (bool) tutor_utils()->get_option( 'enable_gutenberg_course_edit' );
480 return $this->course_post_type === $post_type ? $enable_gutenberg : $can_edit;
481 }
482
483 /**
484 * Register tutor_enrolled post type
485 *
486 * @since v.1.4.0
487 */
488 public function register_tutor_enrolled_post_types() {
489 $args = array(
490 'label' => 'Tutor Enrolled',
491 'description' => __( 'Description.', 'tutor' ),
492 'public' => false,
493 'publicly_queryable' => false,
494 'show_ui' => false,
495 'query_var' => false,
496 'has_archive' => false,
497 'hierarchical' => false,
498 'menu_position' => null,
499 );
500 register_post_type( 'tutor_enrolled', $args );
501 }
502
503 /**
504 * Remove course post menu
505 *
506 * @return void
507 * @since v2.0.0
508 */
509 public function remove_course_post_menu() {
510 remove_menu_page( 'edit.php?post_type=' . tutor()->course_post_type );
511 }
512 }
513