function node_variable_info in Variable 7
Same name and namespace in other branches
- 6 includes/node.variable.inc \node_variable_info()
- 7.2 includes/node.variable.inc \node_variable_info()
Implements hook_variable_info().
File
- includes/
node.variable.inc, line 10 - Variable API module. Definition for Drupal core variables
Code
function node_variable_info($options) {
// Per content type options. Group 'node_type_settings'.
$variables['teaser_length_[node_type]'] = array(
'type' => 'multiple',
'title' => t('Length of trimmed posts'),
'repeat' => array(
'type' => 'select',
'default' => 600,
'options' => 'text_length',
),
'description' => t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'. Note that this setting will only affect new or updated content and will not affect existing teasers.", array(), $options),
'group' => 'node_type_settings',
);
$variables['node_preview_[node_type]'] = array(
'type' => 'multiple',
'title' => t('Preview before submitting'),
'repeat' => array(
'type' => 'select',
'default' => DRUPAL_OPTIONAL,
'options callback' => 'node_variable_option_list',
),
'description' => t('Must users preview posts before submitting?', array(), $options),
'group' => 'node_type_settings',
);
$variables['node_options_[node_type]'] = array(
'type' => 'multiple',
'title' => t('Default options', array(), $options),
'repeat' => array(
'type' => 'options',
'default' => array(
'status',
'promote',
),
'options callback' => 'node_variable_option_list',
),
'description' => t('Users with the <em>administer nodes</em> permission will be able to override these options.', array(), $options),
'group' => 'node_type_settings',
);
$variables['node_submitted_[node_type]'] = array(
'type' => 'multiple',
'title' => t('Display author and date information.', array(), $options),
'repeat' => array(
'default' => TRUE,
'type' => 'boolean',
),
'description' => t('Author username and publish date will be displayed.', array(), $options),
'group' => 'node_type_settings',
);
return $variables;
}