-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathclass-taxonomy-example.php
More file actions
58 lines (53 loc) · 1.81 KB
/
class-taxonomy-example.php
File metadata and controls
58 lines (53 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* To register custom taxonomy.
*
* @package osi-features
*/
namespace Osi\Features\Inc\Taxonomies;
/**
* Class Taxonomy_Example
*/
class Taxonomy_Example extends Base {
/**
* Slug of taxonomy.
*
* @var string
*/
const SLUG = 'taxonomy-slug';
/**
* Labels for taxonomy.
*
* @return array
*/
public function get_labels() {
return array(
'name' => _x( 'Taxonomy_Example', 'taxonomy general name', 'osi-features' ),
'singular_name' => _x( 'Taxonomy_Example', 'taxonomy singular name', 'osi-features' ),
'search_items' => __( 'Search Taxonomy_Example', 'osi-features' ),
'popular_items' => __( 'Popular Taxonomy_Example', 'osi-features' ),
'all_items' => __( 'All Taxonomy_Example', 'osi-features' ),
'parent_item' => null,
'parent_item_colon' => null,
'edit_item' => __( 'Edit Taxonomy_Example', 'osi-features' ),
'update_item' => __( 'Update Taxonomy_Example', 'osi-features' ),
'add_new_item' => __( 'Add New Taxonomy_Example', 'osi-features' ),
'new_item_name' => __( 'New Taxonomy_Example Name', 'osi-features' ),
'separate_items_with_commas' => __( 'Separate Taxonomy_Example with commas', 'osi-features' ),
'add_or_remove_items' => __( 'Add or remove Taxonomy_Example', 'osi-features' ),
'choose_from_most_used' => __( 'Choose from the most used Taxonomy_Example', 'osi-features' ),
'not_found' => __( 'No Taxonomy_Example found.', 'osi-features' ),
'menu_name' => __( 'Taxonomy_Example', 'osi-features' ),
);
}
/**
* List of post types for taxonomy.
*
* @return array
*/
public function get_post_types() {
return array(
'post',
);
}
}