function custom_pub_on_action_form in Custom Publishing Options 6
Same name and namespace in other branches
- 7 custom_pub.module \custom_pub_on_action_form()
Implements a configurable action form.
Allows the user to pick custom publishing options to turn on.
File
- ./
custom_pub.module, line 498 - Adds the ability to add Custom publishing options to the node Add/Edit form.
Code
function custom_pub_on_action_form($context) {
$types = variable_get('custom_pub_types', array());
//get the current custom publishing types
foreach ($types as $type) {
$pub_types[$type['type']] = $type['name'];
}
$form['types'] = array(
'#title' => t('Custom Publishing Options'),
'#description' => t('Select the Custom publishing options to toggle on when this action is triggered.'),
'#type' => 'checkboxes',
'#options' => $pub_types,
'#default_value' => isset($context['types']) ? $context['types'] : array(),
);
return $form;
}