function mailchimp_addto_queue in Mailchimp 7.4
Same name and namespace in other branches
- 8 mailchimp.module \mailchimp_addto_queue()
- 7.5 mailchimp.module \mailchimp_addto_queue()
- 7.3 mailchimp.module \mailchimp_addto_queue()
- 2.x mailchimp.module \mailchimp_addto_queue()
Add a Mailchimp subscription task to the queue.
@string $function The name of the function the queue runner should call. @array $args The list of args to pass to the function.
Return value
bool Success or failure.
3 calls to mailchimp_addto_queue()
- mailchimp_subscribe in ./
mailchimp.module - Subscribe a user to a Mailchimp list in real time or by adding to the queue.
- mailchimp_unsubscribe_member in ./
mailchimp.module - Unsubscribe a member from a list.
- mailchimp_update_member in ./
mailchimp.module - Update a members list subscription in real time or by adding to the queue.
File
- ./
mailchimp.module, line 675 - Mailchimp module.
Code
function mailchimp_addto_queue($function, $args) {
$queue = DrupalQueue::get(MAILCHIMP_QUEUE_CRON);
$queue
->createQueue();
mailchimp_update_local_cache($function, $args);
return $queue
->createItem(array(
'function' => $function,
'args' => $args,
));
}