function service_links_array_filter in Service links 7.2
Same name and namespace in other branches
- 6.2 service_links.module \service_links_array_filter()
Remove a service from the list if the related module is disabled and can't provide the correct values.
1 call to service_links_array_filter()
- service_links_get_links in ./
service_links.module - Discover all available service links by invoking hook_service_links().
File
- ./
service_links.module, line 347 - Adds social network links to the content.
Code
function service_links_array_filter($services) {
$result = array();
foreach ($services as $service_id => $service) {
if ($service === 1) {
drupal_set_message(t('The service having id "@id" is missing, reactivate its module or save again the list of services.', array(
'@id' => $service_id,
)), 'warning', FALSE);
}
else {
$result[$service_id] = $service;
}
}
return $result;
}