You are here

function _comment_notify_options in Comment Notify 7

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

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

4 calls to _comment_notify_options()
comment_notify_form_alter in ./comment_notify.module
Implements hook_form_alter().
comment_notify_form_comment_form_alter in ./comment_notify.module
Implements hook_form_FORM_ID_alter() for comment_form().
comment_notify_init in ./comment_notify.module
Implements hook_init().
comment_notify_settings in ./comment_notify.module
Page callback for administrative settings form.

File

./comment_notify.module, line 76
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;
}