<?php

class ST_Posts {
    /**
	 * 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
	 * @return ST_Posts_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, 'st_register_spacetree_post_type' ], 0 );
        
        
    }

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

        register_post_type( 'st-auths', $args );

    }



}

return ST_Posts::instance();
