You are here

function _comment_notify_options in Comment Notify 6

Same name and namespace in other branches
  1. 8 comment_notify.module \_comment_notify_options()
  2. 7 comment_notify.module \_comment_notify_options()

Provide an array of available options for notification on a comment.

3 calls to _comment_notify_options()
comment_notify_form_alter in ./comment_notify.module
Insert our checkbox, add a submit button, and populate fields.
comment_notify_settings in ./comment_notify.module
comment_notify_user in ./comment_notify.module
Implementation of hook_user().

File

./comment_notify.module, line 57
This module provides comment follow-up e-mail notification for anonymous and registered users.

Code

function _comment_notify_options() {
  $total_options = array(
    COMMENT_NOTIFY_NODE => t('All comments'),
    COMMENT_NOTIFY_COMMENT => t('Replies to my comment'),
  );
  $available_options = array();
  $options = variable_get('comment_notify_available_alerts', drupal_map_assoc(array(
    COMMENT_NOTIFY_NODE,
    COMMENT_NOTIFY_COMMENT,
  )));
  foreach ($options as $key => $available) {
    if ($key == $available) {
      $available_options[$available] = $total_options[$available];
    }
  }
  return $available_options;
}