function simplenews_forms in Simplenews 5
Same name and namespace in other branches
- 6.2 simplenews.module \simplenews_forms()
- 6 simplenews.module \simplenews_forms()
- 7.2 simplenews.module \simplenews_forms()
- 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 774
Code
function simplenews_forms() {
$forms = array();
if ($tree = taxonomy_get_tree(variable_get('simplenews_vid', ''))) {
foreach ($tree as $newsletter) {
$forms['simplenews_block_form_' . $newsletter->tid] = array(
'callback' => 'simplenews_block_form',
'callback arguments' => array(
$newsletter->tid,
),
);
}
}
return $forms;
}