<?php
/**
 * Custom Post Type: bw_tour
 *
 * @package BW_Feature_Tour
 */

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

class BW_Post_Type {

    private static $instance = null;

    public static function get_instance() {
        if ( null === self::$instance ) {
            self::$instance = new self();
        }
        return self::$instance;
    }

    private function __construct() {
        add_action( 'init', array( $this, 'register_post_type' ) );
    }

    /**
     * Register the bw_tour custom post type.
     */
    public function register_post_type() {
        $labels = array(
            'name'               => __( 'Feature Tours', 'bw-feature-tour' ),
            'singular_name'      => __( 'Tour', 'bw-feature-tour' ),
            'add_new'            => __( 'Add New Tour', 'bw-feature-tour' ),
            'add_new_item'       => __( 'Add New Tour', 'bw-feature-tour' ),
            'edit_item'          => __( 'Edit Tour', 'bw-feature-tour' ),
            'new_item'           => __( 'New Tour', 'bw-feature-tour' ),
            'view_item'          => __( 'View Tour', 'bw-feature-tour' ),
            'search_items'       => __( 'Search Tours', 'bw-feature-tour' ),
            'not_found'          => __( 'No tours found', 'bw-feature-tour' ),
            'not_found_in_trash' => __( 'No tours found in Trash', 'bw-feature-tour' ),
            'all_items'          => __( 'All Guides', 'bw-feature-tour' ),
            'menu_name'          => __( 'Feature Tours', 'bw-feature-tour' ),
        );

        $args = array(
            'labels'              => $labels,
            'public'              => false,
            'show_ui'             => true,
            'show_in_menu'        => true,
            'menu_position'       => 80,
            'menu_icon'           => 'dashicons-welcome-learn-more',
            'supports'            => array( 'title' ),
            'has_archive'         => false,
            'exclude_from_search' => true,
            'publicly_queryable'  => false,
            'capability_type'     => 'post',
        );

        register_post_type( 'bw_tour', $args );
    }
}
