function panopoly_widgets_update_7026 in Panopoly Widgets 7
Switch the file widget to the Media browser widget.
File
- ./
panopoly_widgets.install, line 554 - An installation file for Panopoly Widgets
Code
function panopoly_widgets_update_7026() {
$new_widget = array(
'active' => 1,
'module' => 'media',
'settings' => array(
'allowed_schemes' => array(
'private' => 'private',
'public' => 'public',
'vimeo' => 0,
'youtube' => 0,
),
'allowed_types' => array(
'audio' => 0,
'document' => 'document',
'image' => 0,
'video' => 0,
),
'browser_plugins' => array(
'media_default--media_browser_1' => 'media_default--media_browser_1',
'media_default--media_browser_my_files' => 0,
'media_internet' => 0,
'upload' => 'upload',
),
'manualcrop_crop_info' => 1,
'manualcrop_default_crop_area' => 1,
'manualcrop_enable' => 0,
'manualcrop_inline_crop' => 0,
'manualcrop_instant_crop' => FALSE,
'manualcrop_instant_preview' => 1,
'manualcrop_keyboard' => 1,
'manualcrop_maximize_default_crop_area' => 0,
'manualcrop_require_cropping' => array(),
'manualcrop_styles_list' => array(),
'manualcrop_styles_mode' => 'include',
'manualcrop_thumblist' => 0,
),
'type' => 'media_generic',
'weight' => 2,
);
$info = field_info_instance("fieldable_panels_pane", "field_basic_file_file", "basic_file");
if ($info['widget']['type'] == 'file_generic') {
$info['widget'] = $new_widget;
$info['widget']['weight'] = $info['widget']['weight'];
field_update_instance($info);
}
}