<?php
namespace DOZENT_LMS_CERTIFICATE;

defined( 'ABSPATH' ) || exit;

/**
 * Class PostType
 *
 * @package Dozent
 *
 */

class Certificate_Post_Type{

	public function __construct() {
		add_action( 'init', array( $this, 'register_certificate_post_type' ) );

	}

	public function register_certificate_post_type(){
		$labels = array(
			'name'               => _x( 'Certificates', 'post type general name', 'dozent-lms-certificate' ),
			'singular_name'      => _x( 'Certificate', 'post type singular name', 'dozent-lms-certificate' ),
			'menu_name'          => _x( 'Certificates', 'admin menu', 'dozent-lms-certificate' ),
			'name_admin_bar'     => _x( 'Certificate', 'add new on admin bar', 'dozent-lms-certificate' ),
			'add_new'            => _x( 'Add New', 'certificate', 'dozent-lms-certificate' ),
			'add_new_item'       => __( 'Add New Certificate', 'dozent-lms-certificate' ),
			'new_item'           => __( 'New Certificate', 'dozent-lms-certificate' ),
			'edit_item'          => __( 'Edit Certificate', 'dozent-lms-certificate' ),
			'view_item'          => __( 'View Certificate', 'dozent-lms-certificate' ),
			'all_items'          => __( 'Certificates', 'dozent-lms-certificate' ),
			'search_items'       => __( 'Search Certificates', 'dozent-lms-certificate' ),
			'parent_item_colon'  => __( 'Parent Certificates:', 'dozent-lms-certificate' ),
			'not_found'          => __( 'No lectures found.', 'dozent-lms-certificate' ),
			'not_found_in_trash' => __( 'No lectures found in Trash.', 'dozent-lms-certificate' )
		);

		$args = array(
			'labels'                => $labels,
			'description'           => __( 'Description.', 'dozent-lms-certificate' ),
			'public'                => false,
			'publicly_queryable'    => false,
			'show_ui'               => true,
			'show_in_menu'          => false,
			'query_var'             => false,
			'menu_icon'             => 'dashicons-list-view',
			'capability_type'       => 'post',
			'has_archive'           => false,
			'hierarchical'          => true,
			'menu_position'         => 30,
			'supports'              => array( 'title', 'thumbnail'),
			'show_in_rest'          => false,
		);

		register_post_type('dozent_certificate', $args );
	}

}