function hook_slick_skins_info_alter in Slick Carousel 7.2
Alter Slick skins.
This function lives in a module file, not my_module.slick.inc. Overriding skin CSS can be done via theme.info, hook_css_alter(), or below before anything passed before being passed to drupal_process_attached().
@deprecated, removed at D9:
Parameters
array $skins: The associative array of skin information from hook_slick_skins_info().
See also
https://www.drupal.org/node/1901550
https://www.drupal.org/node/1892574
1 invocation of hook_slick_skins_info_alter()
- slick_skins in ./
slick.module - Returns an array of skins registered via hook_slick_skins_info().
File
- ./
slick.api.php, line 508 - Hooks and API provided by the Slick module.
Code
function hook_slick_skins_info_alter(array &$skins) {
// The source can be theme, or module.
// Hence the CSS is provided by my_theme.
$path = drupal_get_path('theme', 'my_theme');
// Modify the default skin's name and description.
$skins['default']['name'] = t('My Theme: Default');
$skins['default']['description'] = t('My Theme default skin.');
// This one won't work.
// $skins['default']['css'][$path . '/css/slick.theme--base.css'] = array();
// This one overrides slick.theme--default.css with slick.theme--base.css.
$skins['default']['css'] = array(
$path . '/css/slick.theme--base.css' => array(),
);
// Overrides skin asNavFor with theme CSS.
$skins['asnavfor']['name'] = t('My Theme: asnavfor');
$skins['asnavfor']['css'] = array(
$path . '/css/slick.theme--asnavfor.css' => array(),
);
// Or with the new name.
$skins['asnavfor']['css'] = array(
$path . '/css/slick.theme--asnavfor-new.css' => array(),
);
// Overrides skin Fullwidth with theme CSS.
$skins['fullwidth']['name'] = t('My Theme: fullwidth');
$skins['fullwidth']['css'] = array(
$path . '/css/slick.theme--fullwidth.css' => array(),
);
}