2025-05-25 19:48:07 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use Drupal\node\NodeInterface;
|
|
|
|
|
2025-05-29 18:12:17 +01:00
|
|
|
/**
|
|
|
|
* @param array<non-empty-string, array<non-empty-string, array{}>> $links
|
|
|
|
* @param array<non-empty-string, mixed> $context
|
|
|
|
*/
|
2025-05-25 19:48:07 +01:00
|
|
|
function opd_podcast_node_links_alter(array &$links, NodeInterface $entity, array &$context): void {
|
|
|
|
if ($entity->bundle() !== 'podcast_episode') {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
$links['node']['#links']['node-readmore']['title'] = t('Listen now<span class="visually-hidden"> to @title</span> →');
|
|
|
|
|
|
|
|
$links['node']['#links']['node-readmore']['attributes']['class'] = [
|
|
|
|
'p-0',
|
|
|
|
];
|
|
|
|
|
|
|
|
$links['#attributes']['class'][] = 'list-none';
|
|
|
|
$links['#attributes']['class'][] = 'm-0';
|
|
|
|
$links['#attributes']['class'][] = 'p-0';
|
|
|
|
}
|