function media_admin_config_browser in D7 Media 7
Same name and namespace in other branches
- 7.4 includes/media.admin.inc \media_admin_config_browser()
- 7.2 includes/media.admin.inc \media_admin_config_browser()
- 7.3 includes/media.admin.inc \media_admin_config_browser()
Admin configruation form for media browser settings.
1 string reference to 'media_admin_config_browser'
- media_menu in ./
media.module - Implement of hook_menu().
File
- includes/
media.admin.inc, line 566 - This file contains the admin functions for the Media module.
Code
function media_admin_config_browser($form, &$form_state) {
$theme_options = array();
$theme_options[NULL] = 'Default administration theme';
foreach (list_themes() as $key => $theme) {
if ($theme->status) {
$theme_options[$key] = $theme->info['name'];
}
}
$form[media_variable_name('dialog_theme')] = array(
'#type' => 'select',
'#title' => t('Media browser theme'),
'#options' => $theme_options,
'#description' => t("This theme will be used for all media related dialogs. It can be different from your site's theme because many site themes do not work well in the small windows which media uses."),
'#default_value' => media_variable_get('dialog_theme'),
);
$form[media_variable_name('file_extensions')] = array(
'#type' => 'textfield',
'#title' => t('Allowed file extensions'),
'#default_value' => media_variable_get('file_extensions'),
'#description' => t('File extensions which are accepted in the media browser. Use spaces to separate (e.g. "jpg gif pdf doc"). <br/><em>Note that this can be overriden on a per-field basis when creating multimedia asset fields and files of certain extensions cannot be embedded at this time.</em>'),
'#maxlength' => 255,
);
$form['#submit'][] = 'media_admin_config_browser_pre_submit';
return system_settings_form($form);
}