Completed
Pull Request — master (#33)
by
unknown
01:38
created

Taxonomies::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App;
4
5
use LIN3S\WPFoundation\Configuration\Translations\Translations;
6
use LIN3S\WPFoundation\PostTypes\Taxonomy;
7
8
class Taxonomies
9
{
10
    const EXAMPLE_POST_CATEGORY = 'example_post_category';
11
12
    public function __construct()
13
    {
14
        new Taxonomy(self::EXAMPLE_POST_CATEGORY, PostTypes::EXAMPLE_POST_TYPE,  [
15
            'labels'       => [
16
                'name'          => Translations::trans('Categories'),
17
                'singular_name' => Translations::trans('Category'),
18
            ],
19
            'sort'         => true,
20
            'hierarchical' => true,
21
        ]);
22
    }
23
}
24