| @@ -1,60 +1,60 @@ | ||
| 1 | -<?php | |
| 2 | - | |
| 3 | -namespace Booktics\Taxonomy; | |
| 4 | - | |
| 5 | -use Booktics\Abstracts\Taxonomy; | |
| 6 | - | |
| 7 | -class Category extends Taxonomy { | |
| 8 | - | |
| 9 | - /** | |
| 10 | - * Get taxonomy name | |
| 11 | - * | |
| 12 | - * @return string | |
| 13 | - */ | |
| 14 | - public function get_name() { | |
| 15 | - return 'booktics_service_category'; | |
| 16 | - } | |
| 17 | - | |
| 18 | - /** | |
| 19 | - * Get taxonomy object type | |
| 20 | - * | |
| 21 | - * @return string | |
| 22 | - */ | |
| 23 | - public function get_obj_type() { | |
| 24 | - return 'post'; | |
| 25 | - } | |
| 26 | - | |
| 27 | - /** | |
| 28 | - * Get taxonomy arguments | |
| 29 | - * | |
| 30 | - * @return array | |
| 31 | - */ | |
| 32 | - public function get_args() { | |
| 33 | - $labels = array( | |
| 34 | - 'name' => esc_html__( 'Category', 'booktics' ), | |
| 35 | - 'singular_name' => esc_html__( 'Category', 'booktics' ), | |
| 36 | - 'search_items' => esc_html__( 'Search Category', 'booktics' ), | |
| 37 | - 'all_items' => esc_html__( 'All Category', 'booktics' ), | |
| 38 | - 'parent_item' => esc_html__( 'Parent Category', 'booktics' ), | |
| 39 | - 'parent_item_colon' => esc_html__( 'Parent Category:', 'booktics' ), | |
| 40 | - 'edit_item' => esc_html__( 'Edit Category', 'booktics' ), | |
| 41 | - 'update_item' => esc_html__( 'Update Category', 'booktics' ), | |
| 42 | - 'add_new_item' => esc_html__( 'Add New Category', 'booktics' ), | |
| 43 | - 'new_item_name' => esc_html__( 'New Category Name', 'booktics' ), | |
| 44 | - 'menu_name' => esc_html__( 'Category', 'booktics' ), | |
| 45 | - ); | |
| 46 | - | |
| 47 | - return array( | |
| 48 | - 'hierarchical' => true, | |
| 49 | - 'labels' => $labels, | |
| 50 | - 'show_ui' => true, | |
| 51 | - 'show_admin_column' => true, | |
| 52 | - 'public' => true, | |
| 53 | - 'show_in_nav_menus' => true, | |
| 54 | - 'show_in_menu' => true, | |
| 55 | - 'query_var' => true, | |
| 56 | - 'show_in_rest' => true, | |
| 57 | - 'rewrite' => array( 'slug' => 'booktics_service_category' ), | |
| 58 | - ); | |
| 59 | - } | |
| 60 | -} | |
| 1 | +<?php | |
| 2 | + | |
| 3 | +namespace Booktics\Taxonomy; | |
| 4 | + | |
| 5 | +use Booktics\Abstracts\Taxonomy; | |
| 6 | + | |
| 7 | +class Category extends Taxonomy { | |
| 8 | + | |
| 9 | + /** | |
| 10 | + * Get taxonomy name | |
| 11 | + * | |
| 12 | + * @return string | |
| 13 | + */ | |
| 14 | + public function get_name() { | |
| 15 | + return 'booktics_service_category'; | |
| 16 | + } | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * Get taxonomy object type | |
| 20 | + * | |
| 21 | + * @return string | |
| 22 | + */ | |
| 23 | + public function get_obj_type() { | |
| 24 | + return 'post'; | |
| 25 | + } | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * Get taxonomy arguments | |
| 29 | + * | |
| 30 | + * @return array | |
| 31 | + */ | |
| 32 | + public function get_args() { | |
| 33 | + $labels = array( | |
| 34 | + 'name' => esc_html__( 'Category', 'booktics' ), | |
| 35 | + 'singular_name' => esc_html__( 'Category', 'booktics' ), | |
| 36 | + 'search_items' => esc_html__( 'Search Category', 'booktics' ), | |
| 37 | + 'all_items' => esc_html__( 'All Category', 'booktics' ), | |
| 38 | + 'parent_item' => esc_html__( 'Parent Category', 'booktics' ), | |
| 39 | + 'parent_item_colon' => esc_html__( 'Parent Category:', 'booktics' ), | |
| 40 | + 'edit_item' => esc_html__( 'Edit Category', 'booktics' ), | |
| 41 | + 'update_item' => esc_html__( 'Update Category', 'booktics' ), | |
| 42 | + 'add_new_item' => esc_html__( 'Add New Category', 'booktics' ), | |
| 43 | + 'new_item_name' => esc_html__( 'New Category Name', 'booktics' ), | |
| 44 | + 'menu_name' => esc_html__( 'Category', 'booktics' ), | |
| 45 | + ); | |
| 46 | + | |
| 47 | + return array( | |
| 48 | + 'hierarchical' => true, | |
| 49 | + 'labels' => $labels, | |
| 50 | + 'show_ui' => true, | |
| 51 | + 'show_admin_column' => true, | |
| 52 | + 'public' => true, | |
| 53 | + 'show_in_nav_menus' => true, | |
| 54 | + 'show_in_menu' => true, | |
| 55 | + 'query_var' => true, | |
| 56 | + 'show_in_rest' => true, | |
| 57 | + 'rewrite' => array( 'slug' => 'booktics_service_category' ), | |
| 58 | + ); | |
| 59 | + } | |
| 60 | +} | |