diff --git a/src/admin/class-tainacan-admin.php b/src/admin/class-tainacan-admin.php index 64869475f..816f19f0c 100644 --- a/src/admin/class-tainacan-admin.php +++ b/src/admin/class-tainacan-admin.php @@ -213,6 +213,20 @@ class Admin { $settings['form_hooks'] = Admin_Hooks::get_instance()->get_registered_hooks(); + $wp_post_types = get_post_types(['show_ui' => true], 'objects'); + if (isset($wp_post_types['attachment'])) { + unset($wp_post_types['attachment']); + } + + $wp_post_types = array_map(function($i) { + return [ + 'slug' => $i->name, + 'label' => $i->label + ]; + }, $wp_post_types); + + $settings['wp_post_types'] = $wp_post_types; + return $settings; } diff --git a/src/admin/components/edition/taxonomy-edition-form.vue b/src/admin/components/edition/taxonomy-edition-form.vue index 98468eec2..7296db7f1 100644 --- a/src/admin/components/edition/taxonomy-edition-form.vue +++ b/src/admin/components/edition/taxonomy-edition-form.vue @@ -112,6 +112,31 @@ :message="$i18n.getHelperMessage('taxonomies', 'allow_insert')"/> + + + + + + + + {{ wpPostType.label }} + + +