Skip to content

Commit

Permalink
Do not render the pdf_url metatag if there is no value (#985)
Browse files Browse the repository at this point in the history
* Do not render the pdf_url metatag if there is no value

* Always return a string
  • Loading branch information
joecorall authored Nov 6, 2023
1 parent 095e0ec commit f29fef2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion islandora.tokens.inc
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function islandora_tokens($type, $tokens, array $data, array $options, Bubbleabl
break;

case 'pdf_url':
$replacements[$original] = ' ' . islandora_url_to_service_file_media_by_mimetype($data['node'], 'application/pdf');
$replacements[$original] = islandora_url_to_service_file_media_by_mimetype($data['node'], 'application/pdf');
break;
}
}
Expand Down Expand Up @@ -188,4 +188,5 @@ function islandora_url_to_service_file_media_by_mimetype($node, $mime_type) {
}
}
}
return '';
}

0 comments on commit f29fef2

Please sign in to comment.