function service_links_sprites_validate in Service links 6.2
Same name and namespace in other branches
- 7.2 plugins/service_links_sprites.module \service_links_sprites_validate()
1 string reference to 'service_links_sprites_validate'
- service_links_sprites_form_alter in plugins/
service_links_sprites.module - Implementation of hook_form_alter().
File
- plugins/
service_links_sprites.module, line 135 - Adds new styles based on sprites.
Code
function service_links_sprites_validate($form, &$form_state) {
$services = array_keys(array_filter($form_state['values']['service_links_show']));
$services = service_links_get_links($services);
$paths = array();
foreach ($services as $service_id => $service) {
$icon = isset($service['icon']) ? $service['icon'] : $service_id . '.png';
$paths[$service_id] = service_links_expand_path($icon);
}
sls_build_sprites($paths);
}