<?php
namespace dpcdCategoryDesign;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Registar Custom Post type 
*/
class Custom_Post_Type {

    /**
     * Initialize the class
     */
    public static function init() {
        add_action('init', [__CLASS__, 'register_custom_post_type']);
    }

    /**
     * Register Custom Post type
    */
    public static function register_custom_post_type() {

        $labels = array(
            'name'               => _x( 'Product Category Design Builder', 'post type general name', 'dynamic-product-categories-design' ),
            'singular_name'      => _x( 'Product Category Design Builder', 'post type singular name', 'dynamic-product-categories-design' ),
            'menu_name'          => _x( 'Category Design Builder', 'admin menu', 'dynamic-product-categories-design' ),
            'name_admin_bar'     => _x( 'Category Design', 'add new on admin bar', 'dynamic-product-categories-design' ),
            'add_new'            => _x( 'Add New Design', 'Category Design', 'dynamic-product-categories-design' ),
            'add_new_item'       => __( 'Add New Category Design', 'dynamic-product-categories-design' ),
            'new_item'           => __( 'New Product Category Design', 'dynamic-product-categories-design' ),
            'edit_item'          => __( 'Edit Product Category Design', 'dynamic-product-categories-design' ),
            'view_item'          => __( 'View Product Category Design', 'dynamic-product-categories-design' ),
            'all_items'          => __( 'All Designs', 'dynamic-product-categories-design' ),
            'search_items'       => __( 'Search Design', 'dynamic-product-categories-design' ),
            'parent_item_colon'  => __( 'Parent Design:', 'dynamic-product-categories-design' ),
        );
    
        $args = array(
            'labels'             => $labels,
            'public'             => false,
            'publicly_queryable' => false,
            'show_ui'            => true,
            'show_in_menu'       => true,
            'query_var'          => false,
            'capability_type'    => 'post',
            'menu_icon'          => 'dashicons-schedule',
            'has_archive'        => false,
            'hierarchical'       => false,
            'menu_position'      => null,
            'supports'           => array( 'title' )
        );
    
        register_post_type( 'dpcd_category_design', $args );

    }

}

Custom_Post_Type::init();