You are here

function _publish_button_publish_node in Publish button 7

Submit handler to publish the node.

1 string reference to '_publish_button_publish_node'
publish_button_render_publish_button in ./publish_button.module
Render publish button.

File

./publish_button.module, line 153
Functions to create a publish button. Real simple, but could be needed.

Code

function _publish_button_publish_node($form, &$form_state) {

  // Set the node status as published. And that's it.
  $form_state['values']['status'] = 1;

  // Use the standard submit function. Do not go custom on me boy.
  node_form_submit($form, $form_state);
}