wordpress-event-bridge-for-.../improvements.md
André Menrath 6964e08559
All checks were successful
PHP Code Checker / PHP Code Checker (pull_request) Successful in 40s
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Successful in 1m34s
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Successful in 1m4s
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Successful in 1m8s
add basic integration tests ffor modern-events-calendar-lite
2024-10-17 20:50:21 +02:00

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;
}
```