function tweetbutton_node_settings in Tweet Button 7
Same name and namespace in other branches
- 6 tweetbutton.admin.inc \tweetbutton_node_settings()
1 string reference to 'tweetbutton_node_settings'
- tweetbutton_menu in ./
tweetbutton.module - Implementation of hook_menu()
File
- ./
tweetbutton.admin.inc, line 104
Code
function tweetbutton_node_settings() {
$form = array();
$node_types = node_type_get_types();
foreach ($node_types as $node_type) {
$types[$node_type->type] = $node_type->name;
}
$form['tweetbutton_node_types'] = array(
'#type' => 'checkboxes',
'#title' => t('Node Types'),
'#options' => $types,
'#default_value' => variable_get('tweetbutton_node_types', array(
'article',
)),
);
$options = array();
$entity_info = entity_get_info('node');
$view_modes = $entity_info['view modes'];
foreach ($view_modes as $name => $info) {
$options[$name] = $info['label'];
}
$options['links'] = t('Node links');
$form['tweetbutton_node_location'] = array(
'#type' => 'checkboxes',
'#title' => t('Locations'),
'#options' => $options,
'#default_value' => variable_get('tweetbutton_node_location', array(
'full',
)),
);
$form['tweetbutton_node_weight'] = array(
'#type' => 'weight',
'#delta' => 50,
'#title' => t('Weight'),
'#default_value' => variable_get('tweetbutton_node_weight', -5),
'#description' => t('Heavier weight will sink button to bottom on node view'),
);
return system_settings_form($form);
}