benecaster_feed_landing_page_enabled
Filters whether a web browser opening a private feed URL is shown the landing page instead of the raw XML.
Fires only for a token-bearing request that has already passed every feed gate (archived, over-limit, dark licence, invalid or revoked token, over-cap lock, lapsed membership) and that has been identified as a browser navigation — so it never runs on a podcast-app poll. Return false to send that browser the XML instead: the kill switch if a podcast client is ever mistaken for a browser. With the page off, every request is served byte-for-byte as before the page existed.
There is deliberately no filter on the landing page’s HTML, because it contains the listener’s feed token.
Switch Off, or Restyle, the Feed Landing Page
When a person opens a valid private feed URL in a web browser (a camera-scanned QR code, a tapped email link), core serves a small landing page with one-tap app links instead of the XML. Podcast apps always get the feed.
Turn the page off for a show — for example while you investigate a podcast client you suspect is being mistaken for a browser — and every request goes back on the feed exactly as before.
To restyle it instead, copy templates/feed/landing-page.php to [theme]/benecaster/feed/landing-page.php. Variables: $show_id, $show_title, $artwork_url, $feed_url, $app_links (keys apple_podcasts, overcast, pocket_casts, castro, podcast_addict) and $protocols.
The page is rendered from the listener’s private feed URL — their credential. An override must be a complete standalone HTML document: never call wp_head() or wp_footer(), which would let analytics and tracking plugins record the URL. Put $feed_url only in the copy field and the app links, never in an http(s) link or an image src. Escape the app links with esc_url( $url, $protocols ), because a bare esc_url() strips podcast://-style schemes to an empty string. There is deliberately no filter on the page’s HTML for the same reason — it contains the listener’s token, and a filter would hand it to any plugin that asked.
<?php
add_filter( 'benecaster_feed_landing_page_enabled', function ( bool $enabled, int $show_id ): bool {
return 42 === $show_id ? false : $enabled;
}, 10, 2 );
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$enabled |
bool |
— | Whether the landing page is shown. Default true. |
$show_id |
int |
— | ID of the show the feed URL belongs to. |
Returns:
bool
Example
add_filter( 'benecaster_feed_landing_page_enabled', function ( bool $enabled, int $show_id ): bool {
return 42 === $show_id ? false : $enabled;
}, 10, 2 );
Notes
Called from FeedController::dispatch().
Need this built rather than just documented? See our services →