function socialfield_field_info in Social field 7
Implements hook_field_info().
File
- ./
socialfield.module, line 274 - Provides a field for adding social services links.
Code
function socialfield_field_info() {
$used_services = array_keys(variable_get('socialfield_services'));
$used_services = array_combine($used_services, $used_services);
$displayed_services = array(
'twitter',
'googleplus',
'facebook',
);
$displayed_services = array_combine($displayed_services, $displayed_services);
$weight_values = range(-10, count($used_services) - 11);
$weights = array_combine($used_services, $weight_values);
return array(
'social_links_field' => array(
'label' => t('Social links'),
'description' => t('Social links'),
'default_widget' => 'socialfield_widget',
'default_formatter' => 'socialfield_formatter',
'property_type' => 'socialfield',
'property_callbacks' => array(
'socialfield_property_callback_property_info_callback',
),
'instance_settings' => array(
'used_services' => $used_services,
'services' => $displayed_services,
'weights' => $weights,
),
),
);
}