function imagepicker_get_link_opts in Image Picker 7
Same name and namespace in other branches
- 6.2 imagepicker.form-elements.inc \imagepicker_get_link_opts()
3 calls to imagepicker_get_link_opts()
- imagepicker_image_form in ./
imagepicker.functions.inc - Function to display the image insertion form
- imagepicker_settings_form in ./
imagepicker.admin.inc - Function to display the imagepicker admin settings form
- imagepicker_user_config_admin_form in ./
imagepicker.user.inc - Submit form
File
- ./
imagepicker.form-elements.inc, line 236 - @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function imagepicker_get_link_opts($default = NULL) {
if (file_default_scheme() == 'private') {
$linkoptions = array(
'none' => t('None'),
'page' => t('Page'),
);
}
else {
$linkoptions = array(
'none' => t('None'),
'file' => t('File'),
'page' => t('Page'),
);
}
if (module_exists('lightbox2') && imagepicker_variable_get('imagepicker_lightbox2_enable', 1)) {
$linkoptions['lightbox'] = t('Lightbox');
}
if (module_exists('colorbox') && imagepicker_variable_get('imagepicker_colorbox_enable', 0)) {
$linkoptions['colorbox'] = t('Colorbox');
}
return array(
'#type' => 'radios',
'#title' => t('Link'),
'#options' => $linkoptions,
'#description' => '',
'#default_value' => $default != NULL ? $default : imagepicker_variable_get('imagepicker_insert_defaults_link', 'none'),
'#prefix' => '<div class="imgp_img_options">',
'#suffix' => '</div>',
);
}