| Total Complexity | 2 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 7 | abstract class Taxonomy extends HookProvider { |
||
| 8 | |||
| 9 | use Labels\Taxonomy; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Get args for register Taxonomy. |
||
| 13 | * |
||
| 14 | * This is passed for the $args attribute from register_taxonomy 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 | * Return your Entity::TAXONOMY, for a better code reuse. |
||
| 23 | */ |
||
| 24 | abstract public function get_taxonomy(): string; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Passed for $object_type param, it can be an array or a string. |
||
| 28 | * |
||
| 29 | * @return array<string>|string |
||
| 30 | */ |
||
| 31 | abstract public function get_object_type(); |
||
| 32 | |||
| 33 | public function register_hooks(): void { |
||
| 35 | } |
||
| 36 | |||
| 37 | protected function register_taxonomy(): void { |
||
| 42 |