You are here

function og_form_node_delete_confirm_alter in Organic groups 6.2

Same name and namespace in other branches
  1. 6 og.module \og_form_node_delete_confirm_alter()

Implementation of hook_form_FORM_ID_alter() for node_delete_confirm.

Add option to migrate group posts before deleting a group.

File

./og.module, line 1856
Code for the Organic Groups module.

Code

function og_form_node_delete_confirm_alter(&$form, &$form_state) {
  $node = node_load($form['nid']['#value']);
  if (og_is_group_type($node->type)) {
    og_node_delete_group_form($form);
  }
  elseif (og_is_group_post_type($node->type)) {
    og_node_delete_nongroup_form($form);
  }
}