PluginProbe
Timetics – Appointment Booking Calendar & Scheduling / trunk
Timetics – Appointment Booking Calendar & Scheduling vtrunk
1.0.61 1.0.60 1.0.59 1.0.58 1.0.57 1.0.56 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 All 62 releases
timetics / core / services / service-taxonomy.php

service-taxonomy.php in Timetics – Appointment Booking Calendar & Scheduling trunk, at core/services/service-taxonomy.php

65 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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