You are here

function custom_pub_forms in Custom Publishing Options 6

Same name and namespace in other branches
  1. 7 custom_pub.module \custom_pub_forms()

Implements hook_forms().

File

./custom_pub.module, line 93
Adds the ability to add Custom publishing options to the node Add/Edit form.

Code

function custom_pub_forms($form_id, $args) {

  //We need to use this hook because on the admin page there is the possibility of multiple forms for the edit form. See http://drupal.org/node/354519
  $types = variable_get('custom_pub_types', array());
  foreach ($types as $type) {
    if ($form_id == 'custom_pub_edit_' . $type['type']) {
      if ($form_id == 'custom_pub_edit_' . $type['type']) {
        $forms[$form_id] = array(
          'callback' => 'custom_pub_edit',
        );
        return $forms;
      }
    }
  }
}