| 1 |
<?php |
| 2 |
/** |
| 3 |
* Service Taxonomy |
| 4 |
* |
| 5 |
* @package Timetics |
| 6 |
*/ |
| 7 |
namespace Timetics\Core\Services; |
| 8 |
|
| 9 |
defined( 'ABSPATH' ) || exit; |
| 10 |
|
| 11 |
use Timetics\Base\Taxonomy; |
| 12 |
|
| 13 |
/** |
| 14 |
* Service Taxonomy |
| 15 |
*/ |
| 16 |
class Service_Taxonomy extends Taxonomy { |
| 17 |
|
| 18 |
/** |
| 19 |
* Set taxonomy props |
| 20 |
* |
| 21 |
* @return void |
| 22 |
*/ |
| 23 |
public function set_props() { |
| 24 |
$this->name = 'timetics-service'; |
| 25 |
$this->cpt = 'timetics-appointment'; |
| 26 |
|
| 27 |
$this->args = $this->taxonomy(); |
| 28 |
} |
| 29 |
|
| 30 |
/** |
| 31 |
* Set taxonomy args |
| 32 |
* |
| 33 |
* @return array |
| 34 |
*/ |
| 35 |
public function taxonomy() { |
| 36 |
$labels = [ |
| 37 |
'name' => esc_html__( 'Category', 'timetics' ), |
| 38 |
'singular_name' => esc_html__( 'Category', 'timetics' ), |
| 39 |
'search_items' => esc_html__( 'Search Category', 'timetics' ), |
| 40 |
'all_items' => esc_html__( 'All Category', 'timetics' ), |
| 41 |
'parent_item' => esc_html__( 'Parent Category', 'timetics' ), |
| 42 |
'parent_item_colon' => esc_html__( 'Parent Category:', 'timetics' ), |
| 43 |
'edit_item' => esc_html__( 'Edit Category', 'timetics' ), |
| 44 |
'update_item' => esc_html__( 'Update Category', 'timetics' ), |
| 45 |
'add_new_item' => esc_html__( 'Add New Category', 'timetics' ), |
| 46 |
'new_item_name' => esc_html__( 'New Category Name', 'timetics' ), |
| 47 |
'menu_name' => esc_html__( 'Category', 'timetics' ), |
| 48 |
]; |
| 49 |
|
| 50 |
$args = [ |
| 51 |
'hierarchical' => true, |
| 52 |
'labels' => $labels, |
| 53 |
'show_admin_column' => true, |
| 54 |
'public' => true, |
| 55 |
'show_ui' => false, |
| 56 |
'show_in_nav_menus' => false, |
| 57 |
'show_in_menu' => false, |
| 58 |
'query_var' => true, |
| 59 |
'show_in_rest' => true, |
| 60 |
]; |
| 61 |
|
| 62 |
return $args; |
| 63 |
} |
| 64 |
} |
| 65 |
|