You are here

function node_expire_form_alter in Node expire 7

Same name and namespace in other branches
  1. 8 node_expire.module \node_expire_form_alter()
  2. 5 node_expire.module \node_expire_form_alter()
  3. 6.2 node_expire.module \node_expire_form_alter()
  4. 6 node_expire.module \node_expire_form_alter()
  5. 7.2 node_expire.module \node_expire_form_alter()

Implements hook_form_alter().

Adds expiration options to the node entry forms

File

./node_expire.module, line 64
Set a timer into your content, allowing you to perform customized actions.

Code

function node_expire_form_alter(&$form, &$form_state, $form_id) {
  if (isset($form['type']) && (isset($form['type']['#value']) && is_string($form['type']['#value'])) && $form['type']['#value'] . '_node_form' == $form_id && ($ntypes = variable_get('node_expire_ntypes', array())) && isset($ntypes[$form['type']['#value']]) && ($ntype = $ntypes[$form['type']['#value']])) {
    module_load_include('nodeapi.inc', 'node_expire');
    _node_expire_form_alter_nodeform($ntype, $form, $form_state, $form_id);
  }
}