21 lines
584 B
PHP
21 lines
584 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Drupal\node\NodeInterface;
|
|
|
|
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';
|
|
}
|