1 node.pages.inc node_preview_banner_form_view_mode_submit(array $form, array &$form_state)

Submit handler for the node preview view mode selection form.

See also

node_preview_banner_form()

File

core/modules/node/node.pages.inc, line 770
Callbacks for adding, editing, and deleting content and managing revisions.

Code

function node_preview_banner_form_view_mode_submit(array $form, array &$form_state) {
  $node = $form_state['values']['node'];
  $node_tempstore_id = $form_state['values']['node_tempstore_id'];
  $form_state['redirect'] = array('node/preview/' . str_replace('_', '-', $node->type) . '/' . $node_tempstore_id, array('query' => array('view_mode' => $form_state['values']['view_mode'])));
}