function slick_get_skins_by_group in Slick Carousel 7.2
Same name and namespace in other branches
- 7.3 slick.deprecated.inc \slick_get_skins_by_group()
Returns available skins by group.
Parameters
string $group: The skin group name: main, thumbnail, overlay, dots, arrows.
bool $select: The flag to limit the skins for form select options.
Return value
array The associative array of available skins grouped by $group, else all skins.
3 calls to slick_get_skins_by_group()
- SlickUi::edit_form in slick_ui/
plugins/ export_ui/ SlickUi.class.php - Overrides the actual editing form.
- slick_attach in ./
slick.module - Returns the fully cached JS and CSS assets for the given slick.
- slick_get_top_elements in includes/
slick.admin.inc - Returns shared starting form elements across Slick field formatter and Views.
File
- ./
slick.module, line 193 - Slick carousel integration, the last carousel you'll ever need.
Code
function slick_get_skins_by_group($group = '', $select = FALSE) {
$skins = $groups = $ungroups = array();
foreach (slick_skins() as $skin => $properties) {
$item = $select ? strip_tags($properties['name']) : $properties;
if (!empty($group)) {
if (isset($properties['group'])) {
if ($properties['group'] != $group) {
continue;
}
$groups[$skin] = $item;
}
elseif (!in_array($group, array(
'arrows',
'dots',
))) {
$ungroups[$skin] = $item;
}
}
$skins[$skin] = $item;
}
return $group ? array_merge($ungroups, $groups) : $skins;
}