function sharethis_field_extra_fields in ShareThis 7.2
Implements hook_field_extra_fields().
File
- ./
sharethis.module, line 146 - A module that adds one of the ShareThis widget to your website.
Code
function sharethis_field_extra_fields() {
$extra = array();
// Only add extra fields if the location is the node content.
$location = variable_get('sharethis_location', array(
'content' => 'content',
));
if (in_array('content', $location, TRUE)) {
$entity_info = entity_get_info('node');
foreach ($entity_info['bundles'] as $bundle => $bundle_info) {
$extra['node'][$bundle]['display'] = array(
'sharethis' => array(
'label' => t('ShareThis'),
'description' => t('ShareThis links'),
'weight' => intval(variable_get('sharethis_weight', 10)),
),
);
}
}
return $extra;
}