function simplenews_forms in Simplenews 6.2
Same name and namespace in other branches
- 5 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 1340 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function simplenews_forms($form_id, $args) {
$forms = array();
$match = preg_match('/simplenews_block_form_(\\d+)/', $form_id, $matches);
if ($match) {
$forms['simplenews_block_form_' . $matches[1]] = array(
'callback' => 'simplenews_block_form',
'callback arguments' => array(
$matches[1],
),
);
}
return $forms;
}