function tweet_admin_submit in Tweet 5.2
Same name and namespace in other branches
- 5 tweet.module \tweet_admin_submit()
- 6.4 tweet.admin.inc \tweet_admin_submit()
- 6.2 tweet.admin.inc \tweet_admin_submit()
- 6.3 tweet.admin.inc \tweet_admin_submit()
- 7.4 tweet.admin.inc \tweet_admin_submit()
Submit handler for tweet_admin().
See also
File
- ./
tweet.module, line 472 - Builds links to post pages to twitter.
Code
function tweet_admin_submit($form_id, $form_values) {
variable_set('tweet_node', $form_values['node_type']);
variable_set('tweet_teaser', $form_values['teaser_type']);
variable_set('tweet_new_window', $form_values['tweet_new_window']);
variable_set('tweet_method', $form_values['tweet_method']);
variable_set('tweet_service', $form_values['tweet_service']);
variable_set('tweet_service_backup', $form_values['tweet_service_backup']);
variable_set('tweet_image', $form_values['tweet_image']);
variable_set('tweet_exclude', $form_values['tweet_exclude']);
variable_set('tweet_format', $form_values['tweet_format']);
//If no types are selected, assign all types.
if ($form_values['types'] == array()) {
$form_values['types'] = _tweet_node_types();
}
variable_set('tweet_types', $form_values['types']);
//Clear the general cache because changed settings may mean that different URLs should be used.
cache_clear_all('*', 'cache', TRUE);
drupal_set_message(t('The configuration options have been saved.'));
}