diff --git a/source/wp-content/themes/wporg-main-2022/functions.php b/source/wp-content/themes/wporg-main-2022/functions.php
index 395bdfc9..3f654cb4 100644
--- a/source/wp-content/themes/wporg-main-2022/functions.php
+++ b/source/wp-content/themes/wporg-main-2022/functions.php
@@ -27,6 +27,7 @@
add_filter( 'wporg_block_navigation_menus', __NAMESPACE__ . '\add_site_navigation_menus' );
add_filter( 'the_title', __NAMESPACE__ . '\translate_the_title', 1, 2 );
add_filter( 'single_post_title', __NAMESPACE__ . '\translate_the_title', 1, 2 );
+add_filter( 'render_block_core/social-link', __NAMESPACE__ . '\inject_podcast_social_icons', 10, 2 );
/**
* Enqueue scripts and styles.
@@ -343,6 +344,41 @@ function translate_the_title( $title, $post_id = null ) {
return $title;
}
+/**
+ * Inject social icons for podcast services.
+ *
+ * This does not register a custom service, it just overrides based on the icon URL for the default (chain) service.
+ *
+ * @param string $block_content The block content.
+ * @param array $block The full block, including name and attributes.
+ *
+ * @return string Updated block content.
+ */
+function inject_podcast_social_icons( $block_content, $block ) {
+ if ( 'chain' !== $block['attrs']['service'] ) {
+ return $block_content;
+ }
+ $icon = '';
+ if ( str_contains( $block['attrs']['url'], 'podcasts.apple.com/' ) ) {
+ // Apple Podcasts.
+ $icon = '';
+ } else if ( str_contains( $block['attrs']['url'], 'pca.st/' ) ) {
+ // Pocket Casts.
+ $icon = '';
+ } else if ( str_contains( $block['attrs']['url'], 'stitcher.com/' ) ) {
+ // Stitcher.
+ $icon = '';
+ }
+
+ if ( $icon ) {
+ $before = explode( '