diff --git a/src/classes/Repositories/Items.php b/src/classes/Repositories/Items.php index 1399c0c73..6ad47b583 100644 --- a/src/classes/Repositories/Items.php +++ b/src/classes/Repositories/Items.php @@ -68,9 +68,14 @@ class TainacanItems { 'capability_type' => 'post', ); register_post_type($cpt_slug, $args); - foreach ($taxonomies as $taxonomy) { - register_taxonomy_for_object_type( $taxonomy, $cpt_slug ); - } + $this->register_post_type_taxonomies( $cpt_slug, $taxonomies ); + } + } + + + function register_post_type_taxonomies( $cpt_slug, $taxonomies ){ + foreach ($taxonomies as $taxonomy) { + register_taxonomy_for_object_type( $taxonomy, $cpt_slug ); } }