function anonymous_publishing_pet_admin_settings in Anonymous Publishing 7
Menu callback: Provide module settings page.
Return value
array Form.
1 string reference to 'anonymous_publishing_pet_admin_settings'
- anonymous_publishing_pet_menu in modules/
pet/ anonymous_publishing_pet.module - Implements hook_menu().
File
- modules/
pet/ anonymous_publishing_pet.module, line 22 - Main hooks for Anonymous Publishing PET module.
Code
function anonymous_publishing_pet_admin_settings() {
$ctypes = node_type_get_names();
if (module_exists('comment')) {
$ctypes['comment'] = 'Comment';
$ctext = '(+ Comment)';
}
else {
$ctext = '';
}
$form['anonymous_publishing_pet_types'] = array(
'#type' => 'checkboxes',
'#multiple' => TRUE,
'#title' => t('Content types !comments where anonymous publishing is managed by this submodule:', array(
'!comments' => $ctext,
)),
'#default_value' => variable_get('anonymous_publishing_pet_types', array()),
'#options' => $ctypes,
'#description' => t('To enable, check the box to the left of the item.'),
);
$alias = _anonymous_publishing_pet_alias();
$form['anonymous_publishing_pet_options'] = array(
'#type' => 'checkboxes',
'#multiple' => TRUE,
'#title' => t('Option:'),
'#default_value' => variable_get('anonymous_publishing_pet_options', array(
'asanon' => 1,
)),
'#options' => array(
'asanon' => t('Allow authenticated users to publish as %alias.', array(
'%alias' => $alias,
)),
),
'#description' => t('Check the option if you want to enable.'),
);
return system_settings_form($form);
}