summaryrefslogtreecommitdiff
path: root/taxonomy.php
blob: 0c65806cbecf427f76723cb86d16796516202312 (plain)
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
<?php
/*
if ( !defined("ABSPATH") ) {
	exit;
}
*/

function create_taxonomy_brennerei() {
	// create a new taxonomy
	register_taxonomy(
		'brennerei',
		'post',
		array(
			'label' => __( 'Hersteller' ),
			'hierarchical' => false,
			'rewrite' => array( 'slug' => 'brennerei' ),
/*
			'capabilities' => array(
				'assign_terms' => 'edit_guides',
				'edit_terms' => 'publish_guides'
			)
*/
		)
	);
}
add_action( 'init', 'create_taxonomy_brennerei', 0 );

function create_taxonomy_whiskyregion() {
	// create a new taxonomy
	register_taxonomy(
		'region',
		'post',
		array(
			'label' => __( 'Whiskyregion' ),
			'hierarchical' => false,
			'rewrite' => array( 'slug' => 'region' ),
		)
	);
}
add_action( 'init', 'create_taxonomy_whiskyregion', 0 );

function create_taxonomy_sponsor() {
	// create a new taxonomy
	register_taxonomy(
		'sponsor',
		'post',
		array(
			'label' => __( 'Sponsored By' ),
			'hierarchical' => false,
			'rewrite' => array( 'slug' => 'sponsored' ),
		)
	);
}
add_action( 'init', 'create_taxonomy_sponsor', 0 );