You are here

function mailchimp_forms in Mailchimp 6.2

Implementation of hook_forms().

File

./mailchimp.module, line 199
Mailchimp module.

Code

function mailchimp_forms($form_id, $args) {

  // have all instances of mailchimp_subscribe_auth_form and
  // mailchimp_subscribe_auth_form map to a single form factory. Needed in
  // case more than one block on a single page.
  if (strpos($form_id, 'mailchimp_subscribe_auth_form') !== FALSE) {
    $forms[$form_id] = array(
      'callback' => 'mailchimp_subscribe_auth_form',
    );
    return $forms;
  }
  else {
    if (strpos($form_id, 'mailchimp_subscribe_anon_form') !== FALSE) {
      $forms[$form_id] = array(
        'callback' => 'mailchimp_subscribe_anon_form',
      );
      return $forms;
    }
  }
}