You are here

function revisioning_ux_delete_all in Revisioning 7

Same name and namespace in other branches
  1. 8 revisioning_ux/revisioning_ux.module \revisioning_ux_delete_all()

Form builder: Delete all.

1 string reference to 'revisioning_ux_delete_all'
revisioning_ux_page_alter in revisioning_ux/revisioning_ux.module
Implements hook_page_alter().

File

revisioning_ux/revisioning_ux.module, line 243
Revisioning User Experience Adjustments

Code

function revisioning_ux_delete_all($form, $form_state, $node) {
  $text = empty($node->revision_moderation) || $node->num_revisions == 1 ? t('Delete') : t('Delete all');
  $form = array();
  $form['node'] = array(
    '#type' => 'value',
    '#value' => $node,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => $text,
    '#submit' => array(
      'revisioning_ux_delete_all_submit',
    ),
  );
  return $form;
}