PostType::__construct()
Source
File: classes/PostType.php
public function __construct() { $this->course_capabilities = [ 'read_post' => 'read_course', 'publish_posts' => 'publish_courses', 'create_posts' => 'edit_courses', 'edit_posts' => 'edit_courses', 'edit_post' => 'edit_course', 'edit_others_posts' => 'edit_others_courses', 'delete_posts' => 'delete_courses', 'delete_others_posts' => 'delete_others_courses', 'read_private_posts' => 'read_private_courses', 'edit_private_posts' => 'edit_private_courses', 'delete_private_posts' => 'delete_private_courses', 'delete_post' => 'delete_course', 'edit_published_posts' => 'edit_published_courses', 'delete_published_posts' => 'delete_published_courses', ]; add_action( 'init', [ $this, 'register_course_post_type' ] ); add_action( 'init', [ $this, 'register_course_categories' ] ); add_action( 'init', array( $this, 'register_lecture_post_type' ) ); add_action( 'init', array( $this, 'register_quiz_post_type' ) ); }