<?php
/**
 * File Path: includes/taxonomies/class-mbs-taxonomy-publisher.php
 *
 * Publisher Taxonomy
 *
 * Flat (non-hierarchical) taxonomy for publisher names. Migrates from
 * mbs_publisher postmeta freetext (DB 2.4 migration in MBS_DB_Installer).
 * Term management uses the standard WP taxonomy admin screen.
 * Book assignment via MBS_Metabox_Publisher_Imprint (Phase 4).
 *
 * @package    My_Book_Showroom
 * @subpackage Includes/Taxonomies
 * @since      1.1.0
 */

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

class MBS_Taxonomy_Publisher {

	public static function register(): void {
		$labels = array(
			'name'          => __( 'Publishers', 'my-book-showroom' ),
			'singular_name' => __( 'Publisher', 'my-book-showroom' ),
			'menu_name'     => __( 'Publishers', 'my-book-showroom' ),
			'search_items'  => __( 'Search Publishers', 'my-book-showroom' ),
			'all_items'     => __( 'All Publishers', 'my-book-showroom' ),
			'edit_item'     => __( 'Edit Publisher', 'my-book-showroom' ),
			'update_item'   => __( 'Update Publisher', 'my-book-showroom' ),
			'add_new_item'  => __( 'Add New Publisher', 'my-book-showroom' ),
			'new_item_name' => __( 'New Publisher Name', 'my-book-showroom' ),
			'not_found'     => __( 'No publishers found.', 'my-book-showroom' ),
		);

		register_taxonomy(
			MBS_TAX_PUBLISHER,
			MBS_POST_TYPE,
			array(
				'labels'            => $labels,
				'hierarchical'      => false,
				'public'            => false,
				'show_ui'           => true,
				'show_in_rest'      => false,
				'show_admin_column' => false,
				'show_in_menu'      => false,
				'show_in_quick_edit' => false,
			)
		);
	}
}
