node_revision_delete_confirm

function node_revision_delete_confirm

node_revision_delete_confirm($form, $form_state, $node_revision)

Form constructor for the revision deletion confirmation form.

This form prevents against CSRF attacks.

Parameters

$node_revision: The node revision ID.

Return value

An array as expected by drupal_render().

See also

node_menu()

node_revision_delete_confirm_submit()

Related topics

File

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

Code

function node_revision_delete_confirm($form, $form_state, $node_revision) {
  $form['#node_revision'] = $node_revision;
  return confirm_form($form, t('Are you sure you want to delete the revision from %revision-date?', array('%revision-date' => format_date($node_revision->revision_timestamp))), 'node/' . $node_revision->nid . '/revisions', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}

© 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_revision_delete_confirm/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部