feat: link a podcast show to where it is heard

Releases already had platform links; shows had none, so the Podcasts
page could not point at Spotify or Apple. chrnx_show terms take a
Spotify, Apple Podcasts and RSS URL now, rendered above the latest
episode and only when a URL exists.

The platform helper takes its definitions as an argument rather than
always reading the release set: a podcast lives on Apple Podcasts, not
Apple Music, and labelling it wrong would send people to the wrong
service.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-08-13 20:21:01 -05:00
1 parent cb491adae6
commit 49047f1337
8 files changed
+197 -6

No files matched your search

+5 -4
View File
@@ -112,12 +112,13 @@ function chrnx_get_release_links( $term_id ) {
/**
* Render a row of platform links, or nothing when none are stored.
*
* @param array<string,string> $links Platform key to URL.
* @param string $class_name Wrapper class.
* @param array<string,string> $links Platform key to URL.
* @param string $class_name Wrapper class.
* @param array<string,array>|null $platforms Platform definitions, defaulting to releases.
* @return string Escaped markup or an empty string.
*/
function chrnx_get_platform_links_markup( array $links, $class_name = 'chrnx-platform-links' ) {
$platforms = chrnx_get_release_platforms();
function chrnx_get_platform_links_markup( array $links, $class_name = 'chrnx-platform-links', $platforms = null ) {
$platforms = is_array( $platforms ) ? $platforms : chrnx_get_release_platforms();
$items = '';
foreach ( $links as $platform => $url ) {