function oembed_settings in oEmbed 7
Same name and namespace in other branches
- 7.0 oembed.admin.inc \oembed_settings()
oEmbed admin settings page callback.
1 string reference to 'oembed_settings'
- oembed_menu in ./
oembed.module - Implements hook_menu().
File
- ./
oembed.admin.inc, line 11 - OEmbed admin pages.
Code
function oembed_settings() {
$form = array();
$period = drupal_map_assoc(array(
3600,
10800,
21600,
32400,
43200,
86400,
172800,
259200,
604800,
1209600,
2419200,
4838400,
9676800,
), 'format_interval');
$period[CACHE_PERMANENT] = t('Indefinite');
$form['oembed_cache_lifetime'] = array(
'#type' => 'select',
'#title' => t('Minimum oEmbed cache lifetime'),
'#options' => $period,
'#default_value' => variable_get('oembed_cache_lifetime', 3600),
'#description' => t('Cached oEmbed output will not be re-requested until at least this much time has elapsed.'),
);
$form['oembed_cache_flush'] = array(
'#type' => 'checkbox',
'#title' => t('Clear oEmbed cache when all Drupal caches are cleared'),
'#default_value' => variable_get('oembed_cache_flush', TRUE),
'#description' => t('Unselect this to retain unexpired cached oEmbed output even when drupal_flush_all_caches() is called. In conjunction with a long %lifetime, this can help reduce costs when using an oEmbed provider service that charges a fee per request.', array(
'%lifetime' => t('Minimum oEmbed cache lifetime'),
)),
);
return system_settings_form($form);
}