<?php
/**
 * Class Taxonomy_Resort_Location
 *
 * @package dvcrs
 */

namespace DVCRS;

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

/**
 * Taxonomy_Resort_Location Class
 */
class Taxonomy_Resort_Location {

	/**
	 * Taxonomy_Resort_Location constructor
	 */
	public function __construct() {

		\add_action( 'init', array( $this, 'register_taxonomy' ), 0 );
	}

	/**
	 * Register custom taxonomy
	 */
	public function register_taxonomy() {

		$labels = array(
			'name'                       => _x( 'Locations', 'Taxonomy General Name', 'dvcrs-core' ),
			'singular_name'              => _x( 'Location', 'Taxonomy Singular Name', 'dvcrs-core' ),
			'menu_name'                  => __( 'Locations', 'dvcrs-core' ),
			'all_items'                  => __( 'All Locations', 'dvcrs-core' ),
			'parent_item'                => __( 'Parent Location', 'dvcrs-core' ),
			'parent_item_colon'          => __( 'Parent Location:', 'dvcrs-core' ),
			'new_item_name'              => __( 'New Location', 'dvcrs-core' ),
			'add_new_item'               => __( 'Add New', 'dvcrs-core' ),
			'edit_item'                  => __( 'Edit Location', 'dvcrs-core' ),
			'update_item'                => __( 'Update Location', 'dvcrs-core' ),
			'view_item'                  => __( 'View Location', 'dvcrs-core' ),
			'separate_items_with_commas' => __( 'Separate resort locations with commas', 'dvcrs-core' ),
			'add_or_remove_items'        => __( 'Add or remove resort locations', 'dvcrs-core' ),
			'choose_from_most_used'      => __( 'Choose from the most used', 'dvcrs-core' ),
			'popular_items'              => __( 'Popular Locations', 'dvcrs-core' ),
			'search_items'               => __( 'Search Locations', 'dvcrs-core' ),
			'not_found'                  => __( 'Not Found', 'dvcrs-core' ),
			'no_terms'                   => __( 'No resort-locations', 'dvcrs-core' ),
			'items_list'                 => __( 'Locations list', 'dvcrs-core' ),
			'items_list_navigation'      => __( 'Locations list navigation', 'dvcrs-core' ),
		);
		$args   = array(
			'labels'             => $labels,
			'hierarchical'       => true,
			'public'             => true,
			'publicly_queryable' => false,
			'show_in_nav_menus'  => false,
			'show_in_rest'       => false,
		);

		\register_taxonomy( 'resort-location', array( 'resort' ), $args );
	}
}

new Taxonomy_Resort_Location();
