Total Complexity | 2 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
7 | abstract class PostType extends HookProvider { |
||
8 | |||
9 | use Labels\PostType; |
||
10 | |||
11 | /** |
||
12 | * Get args for register Post Type. |
||
13 | * |
||
14 | * This is passed for the $args attribute from register_post_type function. |
||
15 | * You can use the function $this->get_labels() for a easy way making your custom labels. |
||
16 | * |
||
17 | * @return array<string> |
||
18 | */ |
||
19 | abstract public function get_args(): array; |
||
20 | |||
21 | /** |
||
22 | * Get post type. |
||
23 | * |
||
24 | * Return your Entity::POST_TYPE, for a better code reuse. |
||
25 | */ |
||
26 | abstract public function get_post_type(): string; |
||
27 | |||
28 | public function register_hooks(): void { |
||
30 | } |
||
31 | |||
32 | protected function register_post_type(): void { |
||
37 |