You are here

function node_gallery_api_field_extra_fields_alter in Node Gallery 7

Implements hook_field_extra_fields().

File

./node_gallery_api.module, line 546
Node Gallery module.

Code

function node_gallery_api_field_extra_fields_alter(&$info) {
  $types = node_gallery_api_get_relationship_type();
  if (!empty($types)) {
    foreach ($types as $type) {
      foreach ($type->gallery_types as $gallery_type) {
        $info['node'][$gallery_type]['display']['node_gallery_view'] = array(
          'label' => t('Gallery View'),
          'description' => t('View specified in the gallery type settings.'),
          'weight' => 100,
        );
      }
      foreach ($type->item_types as $item_types) {
        $info['node'][$item_types]['display']['node_gallery_navigation'] = array(
          'label' => t('Gallery Navigation'),
          'description' => t('Previous / Next links for moving through a gallery.'),
          'weight' => -100,
        );
      }
    }
  }
}