function shariff_libraries_info in Shariff Social Media Buttons 7
Implements hook_libraries().
File
- ./
shariff.module, line 23 - Integrating Shariff library, providing settings form and block.
Code
function shariff_libraries_info() {
$library_path = libraries_get_path('shariff', FALSE);
if (empty($library_path)) {
drupal_set_message(t('Please download at least v1.4.6 of the !link library and place it in libraries under /shariff.
So that the js file is available under .../libraries/shariff/build/shariff.min.js.', array(
'!link' => l(t('Shariff'), 'https://github.com/heiseonline/shariff/releases/latest'),
)), 'warning');
}
$libraries['shariff'] = array(
'name' => 'Shariff Sharing',
'vendor url' => 'https://github.com/heiseonline/shariff',
'download url' => 'https://github.com/heiseonline/shariff/releases/latest',
'version arguments' => array(
'file' => 'build/shariff.min.js',
'pattern' => '@shariff - v([0-9\\.a-z]+)@',
'lines' => 4,
),
'variants' => array(
'naked' => array(
'files' => array(
'js' => array(
'build/shariff.min.js' => array(
'scope' => 'footer',
'weight' => '1',
),
),
),
),
'min' => array(
'files' => array(
'js' => array(
'build/shariff.min.js' => array(
'scope' => 'footer',
'weight' => '1',
),
),
'css' => array(
'build/shariff.min.css',
),
),
),
'complete' => array(
'files' => array(
'js' => array(
'build/shariff.min.js' => array(
'scope' => 'footer',
'weight' => '1',
),
),
'css' => array(
'build/shariff.complete.css',
),
),
),
),
);
return $libraries;
}