function publish_button_render_unpublish_button in Publish button 7
Render unpublish button.
1 call to publish_button_render_unpublish_button()
- publish_button_form_node_form_alter in ./
publish_button.module - Implements hook_form_BASE_FORM_ID_alter().
File
- ./
publish_button.module, line 135 - Functions to create a publish button. Real simple, but could be needed.
Code
function publish_button_render_unpublish_button() {
$unpublish_button = array(
'#type' => 'submit',
'#access' => TRUE,
'#value' => t('Unpublish'),
// Set a pretty high weight, so the button would come last, but
// still make it possible for other modules to add buttons after
// it.
'#weight' => '30',
// Add the submit handler.
'#submit' => array(
'_publish_button_unpublish_node',
),
);
return $unpublish_button;
}