Browse Source

Do not render the pdf_url metatag if there is no value (#985)

* Do not render the pdf_url metatag if there is no value

* Always return a string
pull/995/head
Joe Corall 11 months ago committed by GitHub
parent
commit
f29fef2bac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      islandora.tokens.inc

3
islandora.tokens.inc

@ -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;
}
}
@ -188,4 +188,5 @@ function islandora_url_to_service_file_media_by_mimetype($node, $mime_type) {
}
}
}
return '';
}

Loading…
Cancel
Save