function quicklink_library_info_build in Quicklink 8
Same name and namespace in other branches
- 2.0.x quicklink.module \quicklink_library_info_build()
Implements hook_library_info_build().
File
- ./
quicklink.module, line 14 - Contains quicklink.module.
Code
function quicklink_library_info_build() {
$libraries = [];
if (file_exists(DRUPAL_ROOT . '/libraries/quicklink/dist/quicklink.umd.js')) {
$libraries['quicklink'] = [
'js' => [
'/libraries/quicklink/dist/quicklink.umd.js' => [
'minified' => TRUE,
'weight' => -20,
],
],
];
}
else {
$libraries['quicklink'] = [
'js' => [
'https://unpkg.com/quicklink@1.0.1/dist/quicklink.umd.js' => [
'minified' => TRUE,
'type' => 'external',
'weight' => -20,
],
],
];
}
return $libraries;
}