function mailchimp_signup_feeds_processor_targets_alter in Mailchimp 7.4
Same name and namespace in other branches
- 7.5 modules/mailchimp_signup/mailchimp_signup.module \mailchimp_signup_feeds_processor_targets_alter()
- 7.3 modules/mailchimp_signup/mailchimp_signup.module \mailchimp_signup_feeds_processor_targets_alter()
Implements hook_feeds_node_processor_targets_alter().
File
- modules/
mailchimp_signup/ mailchimp_signup.module, line 508 - Mailchimp Signup module. Allows creation of signup forms integrated with Mailchimp.
Code
function mailchimp_signup_feeds_processor_targets_alter(&$targets, $type, $bundle) {
// Create target for all Mailchimp list subscription fields.
$field_info = field_info_field_types('mailchimp_lists_subscription');
$field_instances = field_info_instances($type, $bundle);
foreach ($field_instances as $field_name => $field) {
if ($field['widget']['type'] == $field_info['default_widget']) {
$targets[$field_name . ':subscribe'] = array(
'name' => t($field['label']),
'description' => t('Mailchimp subscription field.'),
'callback' => 'mailchimp_signup_set_target',
);
}
}
}