Skip to content

Commit

Permalink
Only generate tokens for our Islandora-esque nodes. (#1025)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-vessey committed Jun 3, 2024
1 parent 71d131a commit 780cf6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions islandora.tokens.inc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ function islandora_tokens($type, $tokens, array $data, array $options, Bubbleabl
return;
}
$islandoraUtils = \Drupal::service('islandora.utils');
if (!$islandoraUtils->isIslandoraType('node', $data['node']->bundle())) {
return;
}
foreach ($tokens as $name => $original) {
switch ($name) {
case 'media-original-file:basename':
Expand Down

0 comments on commit 780cf6e

Please sign in to comment.