-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Description
Currently, filters are available for the the cover URL (apple_news_exporter_cover_url) and caption (apple_news_exporter_cover_caption). These filters apply to the cover media selected by the user, falling back to the featured image.
In cases where the user hasn't selected specific cover media, I'd like like to be able to provide an entire set of properties for the cover component, including the provider (image, video, or embed). However, I'd still like for the plugin to fall back to the featured image.
Use Case
On a site with a complex set of options for displaying the lead art for their articles, I'd like to be able to provide a set of candidate media to use as the cover.
These candidates would be derived from the options that my site makes available for displaying lead art, including fallbacks (e.g. a video with a fallback image).
This filter would make it clear whether the user had selected specific cover media through the plugin's UI, so that I can still respect that choice.
My candidate cover media should be run through the plugin's validation routines to make sure they're compatible with Apple News (e.g. supported video filetypes), selecting the first one that's usable.
Lastly, the plugin should continue to fall back to the featured image if none of my candidates can be used.