function yashare_field_extra_fields in Yandex.Share 7
Same name and namespace in other branches
- 7.2 yashare.module \yashare_field_extra_fields()
Implements hook_field_extra_fields().
File
- ./
yashare.module, line 26
Code
function yashare_field_extra_fields() {
$extra = array();
$share_field = array(
'label' => t('Yandex.Share'),
'description' => t('Yandex Share button'),
'weight' => 100,
);
foreach (node_type_get_types() as $type) {
$extra['node'][$type->type]['display']['yashare'] = $share_field;
}
if ($taxonomy_info = entity_get_info('taxonomy_term')) {
foreach (array_keys($taxonomy_info['bundles']) as $bundle) {
$extra['taxonomy_term'][$bundle]['display']['yashare'] = $share_field;
}
}
return $extra;
}