array( 'label' => t('Send'), 'callback' => 'simplenews_issue_send', ), ); return $operations; } /** * Return operations to be applied to subscriptions. * * @ingroup issue */ function hook_simplenews_subscription_operations() { $operations = array( 'activate' => array( 'label' => t('Activate'), 'callback' => 'simplenews_subscription_activate', 'callback arguments' => array(SIMPLENEWS_SUBSCRIPTION_ACTIVE), ), 'inactivate' => array( 'label' => t('Inactivate'), 'callback' => 'simplenews_subscription_activate', 'callback arguments' => array(SIMPLENEWS_SUBSCRIPTION_INACTIVE), ), 'delete' => array( 'label' => t('Delete'), 'callback' => 'simplenews_subscription_delete_multiple', ), ); return $operations; } /** * Act after a newsletter category has been saved. * * @ingroup newsletter */ function hook_simplenews_category_update($category) { } /** * Act after a newsletter category has been deleted. * * @ingroup newsletter */ function hook_simplenews_category_delete($category) { } /** * Act after a subscriber is updated. * * @ingroup subscriber */ function hook_simplenews_subscriber_update($subscriber) { } /** * Act after a new subscriber has been created. * * @ingroup subscriber */ function hook_simplenews_subscriber_insert($subscriber) { } /** * Act after a subscriber has been deleted. * * @ingroup subscriber */ function hook_simplenews_subscriber_delete($subscriber) { } /** * Invoked if a user is subscribed to a newsletter. * * @param $subscriber * The subscriber object including all subscriptions of this user. * * @param $subscription * The subscription object for this specific subscribe action. * * @ingroup subscriber */ function hook_simplenews_subscribe_user($subscriber, $subscription) { } /** * Invoked if a user is unsubscribed from a newsletter. * * @param $subscriber * The subscriber object including all subscriptions of this user. * * @param $subscription * The subscription object for this specific unsubscribe action. * * @ingroup subscriber */ function hook_simplenews_unsubscribe_user($subscriber, $subscription) { } /** * Expose SimplenewsSource cache implementations. * * @return * An array keyed by the name of the class that provides the implementation, * the array value consists of another array with the keys label and * description. * * @ingroup source */ function hook_simplenews_source_cache_info() { return array( 'SimplenewsSourceCacheNone' => array( 'label' => t('No caching'), 'description' => t('This allows to theme each newsletter separately.'), ), 'SimplenewsSourceCacheBuild' => array( 'label' => t('Cached content source'), 'description' => t('This caches the rendered content to be sent for multiple recipients. It is not possible to use subscriber specific theming but tokens can be used for personalization.'), ), ); }