Change or remove the affiliate disclosure line on episode pages
When an episode has affiliate links, Outlinks prints a disclosure line above its references on the single episode page. benecaster_outlinks_disclosure_text receives the show’s own wording, or the default “This episode contains affiliate links — we may earn a commission at no extra cost to you.”, and returns the line to print.
It runs only when the line is about to print: Outlinks is on for the show, the show’s disclosure is on, and at least one of the episode’s references has a tracked link with an affiliate URL (on the link or on any of its country rules; an expired link still counts).
Code
<?php
add_filter( 'benecaster_outlinks_disclosure_text', function ( string $text, int $show_id ): string {
if ( 12 === $show_id ) {
return ''; // This show discloses in its own episode template.
}
return $text . ' ' . __( 'Thank you for supporting the show.', 'my-theme' );
}, 10, 2 );
Hooks Used
Need this built rather than just documented? See our services →