<?php

class ST_ProQyz_Post_Signup {
    /**
	 * Ielts_Lms_Post_Quiz version.
	 *
	 * @var string
	 */
    public $version = '1.0.0';

    protected static $_instance = null;

    /**
	 * Main Ielts_Lms Instance.
	 *
	 * Ensures only one instance of Ielts_Lms_Post_Types is loaded or can be loaded.
	 *
	 * @since 1.0
	 * @static
	 * @see IELTS_LMS_POST_TYPES()
	 * @return Ielts_Lms_Post_Types - Main instance.
	 */
    public static function instance() {
        if ( is_null( self::$_instance ) ) {
            self::$_instance = new self();
        }
        return self::$_instance;
    }

    public function __construct() {
    
        add_action( 'init', [ $this, 'ieltslms_register_signup_post_type' ], 0 );
        
        
    }

    // Register Custom Post Type
    public function ieltslms_register_signup_post_type() {
        $labels = array(
            'name'                  => _x( 'Signups', 'Post Type General Name', 'proqyz' ),
            'singular_name'         => _x( 'Signup', 'Post Type Singular Name', 'proqyz' ),
            'menu_name'             => __( 'Signups', 'proqyz' ),
            'all_items'             => __( 'All Signups', 'proqyz' ),
            'add_new'               => __( 'Add New', 'proqyz' ),
            'add_new_item'          => __( 'Add New Signup', 'proqyz' ),
            'edit_item'             => __( 'Edit Signup', 'proqyz' ),
            'new_item'              => __( 'New Signup', 'proqyz' ),
            'view_item'             => __( 'View Signup', 'proqyz' ),
            'search_items'          => __( 'Search Signups', 'proqyz' ),
            'not_found'             => __( 'No signups found', 'proqyz' ),
            'not_found_in_trash'    => __( 'No Signups found in Trash', 'proqyz' ),
            'parent_item_colon'     => __( 'Parent Signup:', 'proqyz' ),
            'menu_icon'             => 'dashicons-welcome-learn-more', // You can change the icon
        );
    
        $args = array(
            'labels'                => $labels,
            'public'                => true,
            'publicly_queryable'    => true,
            'show_ui'               => true,
            'show_in_menu'          => false, // Set to false to hide from the menu
            'query_var'             => true,
            'rewrite'               => array( 'slug' => 'signup' ),
            'capability_type'       => 'post',
            'has_archive'           => true,
            'hierarchical'          => false,
            'menu_position'         => null,
            'supports'              => array( 'title', 'editor'),
        );

        register_post_type( 'signup', $args );

    }



}

return ST_ProQyz_Post_Signup::instance();
