-
Notifications
You must be signed in to change notification settings - Fork 19
/
issuem-tags-taxonomy.php
55 lines (48 loc) · 1.54 KB
/
issuem-tags-taxonomy.php
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
<?php
/**
* Registers IssueM Article, Tags Taxonomy w/ Meta Boxes
*
* @package IssueM
* @since 1.0.0
*/
/**
* Registers Article Category taxonomy for IssueM
*
* @since 1.0.0
* @todo misnamed originaly, should reallly be issuem_article_tags
*/
function create_issuem_tags_taxonomy() {
$labels = array(
'name' => __( 'Article Tags', 'issuem' ),
'singular_name' => __( 'Article Tag', 'issuem' ),
'search_items' => __( 'Search Article Tags', 'issuem' ),
'all_items' => __( 'All Article Tags', 'issuem' ),
'parent_item' => __( 'Parent Article Tag', 'issuem' ),
'parent_item_colon' => __( 'Parent Article Tag:', 'issuem' ),
'edit_item' => __( 'Edit Article Tag', 'issuem' ),
'update_item' => __( 'Update Article Tag', 'issuem' ),
'add_new_item' => __( 'Add New Article Tag', 'issuem' ),
'new_item_name' => __( 'New Article Tag', 'issuem' ),
'menu_name' => __( 'Article Tags', 'issuem' ),
);
register_taxonomy(
'issuem_issue_tags',
array(),
array(
'hierarchical' => false,
'labels' => $labels,
'show_ui' => true,
'show_tagcloud' => true,
'show_in_rest' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'article-tags' ),
'capabilities' => array(
'manage_terms' => 'manage_article_tags',
'edit_terms' => 'manage_article_tags',
'delete_terms' => 'manage_article_tags',
'assign_terms' => 'edit_issues',
),
)
);
}
add_action( 'init', 'create_issuem_tags_taxonomy', 0 );