André Menrath
7e8346cf7b
https://webnus.net/modern-events-calendar/ Reviewed-on: Event-Federation/wordpress-activitypub-event-bridge#66 Co-authored-by: André Menrath <andre.menrath@posteo.de> Co-committed-by: André Menrath <andre.menrath@posteo.de>
16 lines
459 B
Markdown
16 lines
459 B
Markdown
Make use of:
|
|
|
|
https://docs.theeventscalendar.com/reference/classes/tribe__events__api/get_event_terms/
|
|
|
|
for getting all tags/terms for an event!
|
|
|
|
```
|
|
public static function get_event_terms( $event_id, array $args = array() ) {
|
|
$terms = array();
|
|
foreach ( get_post_taxonomies( $event_id ) as $taxonomy ) {
|
|
$tax_terms = wp_get_object_terms( $event_id, $taxonomy, $args );
|
|
$terms[ $taxonomy ] = $tax_terms;
|
|
}
|
|
return $terms;
|
|
}
|
|
```
|