registrando todas as taxonomias na criação do item

This commit is contained in:
Eduardo humberto 2017-11-10 09:39:45 -02:00
parent 3530d403d8
commit f1ca439b04
1 changed files with 8 additions and 3 deletions

View File

@ -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 );
}
}