function multiversion_form_revision_overview_form_alter in Multiversion 8
Implements hook_form_FORM_ID_alter().
Alters the 'revision_overview_form' for provided by Diff module.
File
- ./
multiversion.module, line 649
Code
function multiversion_form_revision_overview_form_alter(&$form, FormStateInterface $form_state, $form_id) {
if (isset($form['node_revisions_table'])) {
foreach ($form['node_revisions_table'] as $key => $revision_info) {
if (empty($revision_info['operations']) || !is_array($revision_info['operations'])) {
continue;
}
if (isset($revision_info['operations']['#links']['delete'])) {
unset($form['node_revisions_table'][$key]['operations']['#links']['delete']);
}
}
}
}