@@ -32,11 +32,12 @@ public function __construct(
3232 * @param string|null $singular The singular label for the taxonomy
3333 * @param string|null $plural The plural label for the taxonomy
3434 * @param array<string, mixed> $args Additional arguments
35+ * @param int $priority Declaration priority
3536 * @return object The created taxonomy instance
3637 */
37- public function create (string $ slug , string |array $ objectType , ?string $ singular = null , ?string $ plural = null , array $ args = []): object
38+ public function create (string $ slug , string |array $ objectType , ?string $ singular = null , ?string $ plural = null , array $ args = [], int $ priority = 5 ): object
3839 {
39- return $ this ->factory ->make ($ slug , $ objectType , $ singular , $ plural , $ args );
40+ return $ this ->factory ->make ($ slug , $ objectType , $ singular , $ plural , $ args, $ priority );
4041 }
4142
4243 /**
@@ -47,12 +48,13 @@ public function create(string $slug, string|array $objectType, ?string $singular
4748 * @param string|null $singular The singular label for the taxonomy
4849 * @param string|null $plural The plural label for the taxonomy
4950 * @param array<string, mixed> $args Additional arguments
51+ * @param int $priority Declaration priority
5052 * @return object The registered taxonomy instance
5153 */
52- public function register (string $ slug , string |array $ objectType , ?string $ singular = null , ?string $ plural = null , array $ args = []): object
54+ public function register (string $ slug , string |array $ objectType , ?string $ singular = null , ?string $ plural = null , array $ args = [], int $ priority = 5 ): object
5355 {
5456 // The factory creates and registers the taxonomy (pollora/entity handles register_taxonomy)
55- return $ this ->factory ->make ($ slug , $ objectType , $ singular , $ plural , $ args );
57+ return $ this ->factory ->make ($ slug , $ objectType , $ singular , $ plural , $ args, $ priority );
5658 }
5759
5860 /**
0 commit comments