function mailchimp_signup_block_view in Mailchimp 7.5
Same name and namespace in other branches
- 7.3 modules/mailchimp_signup/mailchimp_signup.module \mailchimp_signup_block_view()
- 7.4 modules/mailchimp_signup/mailchimp_signup.module \mailchimp_signup_block_view()
Implements hook_block_view().
Provides a block for each signup configured to add a block.
File
- modules/
mailchimp_signup/ mailchimp_signup.module, line 125 - Mailchimp Signup module. Allows creation of signup forms integrated with Mailchimp.
Code
function mailchimp_signup_block_view($delta = '') {
$signup = mailchimp_signup_load($delta);
if ($signup) {
$block = array(
'subject' => check_plain($signup
->getTranslation('title')),
'content' => drupal_get_form('mailchimp_signup_subscribe_block_' . $signup->name . '_form', $signup, 'mailchimp_signup_block'),
);
}
else {
$block = FALSE;
}
return $block;
}