Skip to main content

Replace or suppress the platform links output

Free Beginner Since v1.0.0

Filter the final output of [benecaster_platform_links]. Use to wrap in additional markup, inject custom badge HTML for a specific platform, suppress the block on certain pages, or replace the list entirely with a custom template.

Code

<?php
// Wrap the platform links in a themed "listen on" card.
add_filter(
    'benecaster_platform_links_output',
    function ( string $html, array $links, array $atts ): string {
        return '<div class="my-listen-card"><h3>Listen on</h3>' . $html . '</div>';
    },
    10, 3
);

View on GitHub →

Hooks Used