node_form_delete_submit

function node_form_delete_submit

node_form_delete_submit($form, &$form_state)

Form submission handler for node_form().

Handles the 'Delete' button on the node form.

See also

node_form()

node_form_validate()

File

modules/node/node.pages.inc, line 338
Page callbacks for adding, editing, deleting, and revisions management for content.

Code

function node_form_delete_submit($form, &$form_state) {
  $destination = array();
  if (isset($_GET['destination'])) {
    $destination = drupal_get_destination();
    unset($_GET['destination']);
  }
  $node = $form['#node'];
  $form_state['redirect'] = array('node/' . $node->nid . '/delete', array('query' => $destination));
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!node!node.pages.inc/function/node_form_delete_submit/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部