<?php
if (!defined('ABSPATH')) exit();
if (trait_exists('RegisterCourseTags')) return;

trait RegisterCourseTags
{
  	public function registerTags()
  	{
  			$args = array(
  				'hierarchical'      => true,
  				'labels'            => [
  							'name'              => __('Courses Tags', 'ulp'),
  							'singular_name'     => __('Course Tag', 'ulp'),
  							'search_items'      => __('Search Course Tag', 'ulp'),
  							'all_items'         => __('Courses Tags', 'ulp'),
  							'parent_item'       => '',
  							'parent_item_colon' => '',
  							'edit_item'         => __('Edit', 'ulp'),
  							'update_item'       => __('Update', 'ulp'),
  							'add_new_item'      => __('Add new course tag', 'ulp'),
  							'new_item_name'     => __('Add new course tag', 'ulp'),
  							'menu_name'         => __('Courses Tags', 'ulp'),
  				],
  				'show_ui'           => true,
  				'show_admin_column' => true,
  				'query_var'         => true,
  				'rewrite'           => ['slug' => 'course_tags'],
  			);
  			register_taxonomy('course_tags', 'ulp_course', $args);
  	}
}
