Skip to main content

benecaster_episode_subscribe_fallback_message

Filter Free

Filters the subscribe CTA fallback text shown in episode/subscribe.php when no subscribe URL is configured on the show.

Return a plain-text string. Output through esc_html(), so markup becomes literal entities. Returning '' renders an empty paragraph rather than suppressing the prompt.

Parameters

Name Type Default Description
$message string Fallback subscribe CTA message HTML
$show_id int ID of the show

Returns: string

Example

add_filter( 'benecaster_episode_subscribe_fallback_message', function( $message, $show_id ) {
    // Replace the fallback with a link to the show's Patreon page.
    $patreon = get_post_meta( $show_id, '_show_patreon_url', true );
    if ( $patreon ) {
        return '<p>Support the show on <a href="' . esc_url( $patreon ) . '" rel="noopener">Patreon</a> to access subscriber feeds.</p>';
    }
    return $message;
}, 10, 2 );

Affects

  • episode/subscribe.php template part