function media_gallery_update_7006 in Media Gallery 7.2
Same name and namespace in other branches
- 7 media_gallery.install \media_gallery_update_7006()
Make sure the gallery node form includes the media_gallery_lightbox_extras checkbox.
File
- ./
media_gallery.install, line 1160 - Install file for media_gallery. Includes field and instance definitions.
Code
function media_gallery_update_7006() {
// Whether to show a "Exclude title and description" checkbox.
$field = array(
'field_name' => 'media_gallery_lightbox_extras',
'label' => 'Lightbox title and description',
'description' => 'Show title and description',
'default_value' => array(
array(
'value' => 0,
),
),
'widget' => array(
'type' => 'options_onoff',
),
'display' => array(
'default' => array(
'type' => 'hidden',
'label' => 'hidden',
),
'full' => array(
'type' => 'hidden',
'label' => 'hidden',
),
'teaser' => array(
'type' => 'hidden',
'label' => 'hidden',
),
'media_gallery_block' => array(
'type' => 'hidden',
'label' => 'hidden',
),
),
);
$instance = array(
'field_name' => 'media_gallery_lightbox_extras',
'label' => 'Lightbox title and description',
'description' => 'Show title and description',
'default_value' => array(
array(
'value' => 0,
),
),
'entity_type' => 'node',
'bundle' => 'media_gallery',
'widget' => array(
'type' => 'options_onoff',
),
'display' => array(
'default' => array(
'type' => 'hidden',
'label' => 'hidden',
),
'full' => array(
'type' => 'hidden',
'label' => 'hidden',
),
'teaser' => array(
'type' => 'hidden',
'label' => 'hidden',
),
'media_gallery_block' => array(
'type' => 'hidden',
'label' => 'hidden',
),
),
);
_media_gallery_ensure_field($field);
_media_gallery_ensure_instance($instance);
}