benecaster_platform_audio_hosts
The hosts whose media the post-import review table flags as Platform-hosted media, and the episode editor’s Media tab warns about as an audio or video URL is typed — the one completeness flag about something outside the podcaster’s control rather than merely absent, because the platform they are leaving decides how long an enclosure there keeps serving.
It runs on every Benecaster admin page load, where the filtered list is sent to the admin app for the Media tab’s warning, and once per review-table row that has an audio or video URL. Keep a callback cheap. To run the same check yourself, call \Benecaster\Episode\PlatformAudioHosts::is_platform_hosted( $url ) or read ::hosts(), but never from a callback on this filter: both apply it, so the call would recurse.
With the Migration Wizard active it drives a second screen. The wizard’s Check my feed reads the same list, so the filter also fires on the wizard’s detect-hosting REST route, once per check. That request is not an admin screen: get_current_screen() returns null there, so do not call methods on it from a callback. Returning [] switches off the wizard’s warning as well as the review table’s flag.
Benecaster’s list: patreon.com, patreonusercontent.com, stream.mux.com (Patreon video), anchor.fm, supercast.com, supportingcast.fm, memberful.com, glow.fm, substack.com, substackcdn.com. It is the public constant \Benecaster\Episode\ImportReviewQuery::PLATFORM_AUDIO_HOSTS: an add-on running its own check can seed from it so both agree. It is the base list, before this filter, so read it rather than applying the filter from inside your own callback, which would recurse. stream.mux.com is Mux’s playback host for every Mux customer, so a podcaster hosting their own video on Mux is flagged too.
Give bare, lowercase domains or hostnames (example.com, or stream.mux.com) — no scheme, port, path or leading dot. Each is matched against the enclosure URL’s host exactly or as a subdomain, so example.com covers cdn.example.com but never notexample.com, example.com.evil.test, or the string appearing in a path. Return [] to switch the flag off entirely.
Add platforms a podcaster leaves, not podcast hosts. A file on Libsyn, Buzzsprout or Captivate keeps working after a move to Benecaster; flagging those would mark the majority of healthy imports and teach podcasters to ignore the chip. The intended caller is an add-on that migrates from a specific platform and knows its CDN domain.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$hosts |
string[] |
— | Domains or hostnames, seeded with `ImportReviewQuery::PLATFORM_AUDIO_HOSTS`. |
Returns:
string[]
Example
add_filter( 'benecaster_platform_audio_hosts', function ( array $hosts ): array {
$hosts[] = 'media.myplatform.example';
return $hosts;
} );
Notes
See Flag imported episodes your own way for reading the review table's flags array this filter feeds into.
Need this built rather than just documented? See our services →