function picture_library in Picture 7
Same name and namespace in other branches
- 7.2 picture.module \picture_library()
Implements hook_library().
File
- ./
picture.module, line 159 - Picture formatter.
Code
function picture_library() {
$libraries = array();
switch (variable_get('picture_implementation', PICTURE_IMPLEMENTATION_DEFAULT)) {
case PICTURE_IMPLEMENTATION_PICTUREFILL2:
$libraries['picturefill'] = array(
'title' => t('Picturefill'),
'website' => 'https://github.com/scottjehl/picturefill',
'version' => '2.0',
'js' => array(
drupal_get_path('module', 'picture') . '/picturefill2/picturefill.js' => array(
'type' => 'file',
'weight' => -10,
'group' => JS_DEFAULT,
'scope' => 'footer',
'need_jquery' => FALSE,
),
),
);
break;
case PICTURE_IMPLEMENTATION_PICTUREFILL:
$libraries['matchmedia'] = array(
'title' => t('Matchmedia'),
'website' => 'https://github.com/attiks/picturefill-proposal',
'version' => '0.1',
'js' => array(
drupal_get_path('module', 'picture') . '/picturefill/matchmedia.js' => array(
'type' => 'file',
'weight' => -10,
'group' => JS_DEFAULT,
'scope' => 'footer',
'need_jquery' => FALSE,
),
),
);
$libraries['picturefill'] = array(
'title' => t('Picturefill'),
'website' => 'https://github.com/attiks/picturefill-proposal',
'version' => '0.1',
'js' => array(
drupal_get_path('module', 'picture') . '/picturefill/picturefill.js' => array(
'type' => 'file',
'weight' => -10,
'group' => JS_DEFAULT,
'scope' => 'footer',
'need_jquery' => FALSE,
),
),
);
$libraries['picture.ajax'] = array(
'title' => t('Ajax support for picture'),
'version' => VERSION,
'js' => array(
drupal_get_path('module', 'picture') . '/picture.js' => array(
'type' => 'file',
'weight' => -10,
'group' => JS_DEFAULT,
'scope' => 'footer',
'need_jquery' => FALSE,
),
),
);
break;
case PICTURE_IMPLEMENTATION_WEBLINC:
$libraries['matchmedia'] = array(
'title' => t('Matchmedia'),
'website' => 'https://github.com/weblinc/media-match',
'version' => '0.1',
'js' => array(
drupal_get_path('module', 'picture') . '/weblinc/media.js' => array(
'type' => 'file',
'weight' => -10,
'group' => JS_DEFAULT,
'scope' => 'footer',
'need_jquery' => FALSE,
),
drupal_get_path('module', 'picture') . '/weblinc/media.extension.js' => array(
'type' => 'file',
'weight' => -10,
'group' => JS_DEFAULT,
'scope' => 'footer',
'need_jquery' => FALSE,
),
),
'css' => array(
drupal_get_path('module', 'picture') . '/weblinc/media.css' => array(
'type' => 'file',
),
),
);
$libraries['picturefill'] = array(
'title' => t('Picturefill'),
'website' => 'https://github.com/weblinc/picture',
'version' => '0.1',
'js' => array(
drupal_get_path('module', 'picture') . '/weblinc/picture.js' => array(
'type' => 'file',
'weight' => -10,
'group' => JS_DEFAULT,
'scope' => 'footer',
'need_jquery' => FALSE,
),
),
);
$libraries['picture.ajax'] = array(
'title' => t('Ajax support for picture'),
'version' => VERSION,
'js' => array(
drupal_get_path('module', 'picture') . '/picture.weblinc.js' => array(
'type' => 'file',
'weight' => -10,
'group' => JS_DEFAULT,
'scope' => 'footer',
'need_jquery' => FALSE,
),
),
'css' => array(
drupal_get_path('module', 'picture') . '/picture.weblinc.css' => array(
'type' => 'file',
),
),
);
break;
}
return $libraries;
}