<?php

// Register Custom Janer Taxonomy
function tmt_cat()  {
	$post_type_slug = TMT_Get_Setting('post-type', 'slug');
	$cat_slug = TMT_Get_Setting('taxonomy', 'cat-slug');
	$args = array(
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
        'show_in_rest'               => true,
	);
	register_taxonomy( $cat_slug, $post_type_slug, $args );
}
add_action( 'init', 'tmt_cat', 0 );

// Register Custom Taxonomy
function tmt_tags() {
	$post_type_slug = TMT_Get_Setting('post-type', 'slug');
	$tag_slug = TMT_Get_Setting('taxonomy', 'tag-slug');
	$args = array(
		'hierarchical'               => false,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
        'show_in_rest'               => true,
	);
	register_taxonomy( $tag_slug, $post_type_slug, $args );
}
add_action( 'init', 'tmt_tags', 0 );