You are here

function simplenews_forms in Simplenews 6

Same name and namespace in other branches
  1. 5 simplenews.module \simplenews_forms()
  2. 6.2 simplenews.module \simplenews_forms()
  3. 7.2 simplenews.module \simplenews_forms()
  4. 7 simplenews.module \simplenews_forms()

Implementation of hook_forms().

All form blocks are build using simplenews_block_form(). hook_forms() is required to provide unique form id for each block form.

File

./simplenews.module, line 944
Simplnews node handling, sent email, newsletter block and general hooks

Code

function simplenews_forms() {
  if ($taxonomies = taxonomy_get_tree(variable_get('simplenews_vid', ''))) {
    foreach ($taxonomies as $newsletter) {
      $forms['simplenews_block_form_' . $newsletter->tid] = array(
        'callback' => 'simplenews_block_form',
        'callback arguments' => array(
          $newsletter->tid,
        ),
      );
    }
  }
  return $forms;
}