Tribe__Events__Main::register_taxonomy()
Registers the Events’ category taxonomy in WordPress.
Return
(WP_Taxonomy|WP_Error) The registered taxonomy object on success, WP_Error object on failure.
Source
File: src/Tribe/Main.php
public function register_taxonomy() {
$taxonomy_args = [
'hierarchical' => true,
'update_count_callback' => '',
'rewrite' => [
'slug' => $this->rewriteSlug . '/' . $this->category_slug,
'with_front' => false,
'hierarchical' => true,
],
'public' => true,
'show_ui' => true,
'labels' => $this->taxonomyLabels,
'capabilities' => [
'manage_terms' => 'publish_tribe_events',
'edit_terms' => 'publish_tribe_events',
'delete_terms' => 'publish_tribe_events',
'assign_terms' => 'edit_tribe_events',
],
];
/**
* Filter the event category taxonomy arguments used in register_taxonomy.
*
* @since 4.5.5
*
* @param array $taxonomy_args
*
*/
$taxonomy_args = apply_filters( 'tribe_events_register_event_cat_type_args', $taxonomy_args );
return register_taxonomy( self::TAXONOMY, self::POSTTYPE, $taxonomy_args );
}
Changelog
| Version | Description |
|---|---|
| 6.0.9 | Introduced. |