Automattic / Automattic/eventbrite-api
filter_event_permalink filters any call to get_permalink while event is the global post
- Dominant language
- PHP
- Stars
- 69
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
[filter_event_permalink](https://github.com/Automattic/eventbrite-api/blob/master/inc/class-eventbrite-query.php#L384) will filter **all** calls to `get_permalink` while the global $post is the event.
Eg. I was iterating over a list of plain, non-event post objects within the `eventbrite-single.php` intending to output their permalinks, but calls such as `get_permalink($my_post)` will always return the permalink for the current event.
I tried to add $post as an arg to `filter_event_permalink` so it would only conditionally change the permalink but the arg never seemed to be populated.
My work around was to just call `setup_postdata($my_post)` and `wp_reset_postdata()` for every post object. Hope it saves someone some time.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.