function mailchimp_signup_feeds_processor_targets_alter in Mailchimp 7.5
Same name and namespace in other branches
- 7.3 modules/mailchimp_signup/mailchimp_signup.module \mailchimp_signup_feeds_processor_targets_alter()
- 7.4 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 523 - 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/audience 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',
);
}
}
}