You are here

function ajax_comments_node_type_active in AJAX Comments 7

Returns TRUE if this node uses ajax comments or if no nodes are selected.

7 calls to ajax_comments_node_type_active()
ajax_comments_comment_view_alter in ./ajax_comments.module
Implements hook_comment_view_alter().
ajax_comments_form_comment_confirm_delete_alter in ./ajax_comments.module
Implements hook_form_FORM_ID_alter().
ajax_comments_form_comment_form_alter in ./ajax_comments.module
Implements hook_form_FORM_ID_alter().
ajax_comments_nodejs_process_node in ajax_comments_nodejs/ajax_comments_nodejs.module
Implements hook_preprocess_node()
ajax_comments_preprocess_comment in ./ajax_comments.module
Implements template_preprocess_comment() Wrap comments and their replies in a #comment-wrapper-(cid) div

... See full list

File

./ajax_comments.module, line 773
AJAX comments module file.

Code

function ajax_comments_node_type_active($node_type) {
  $types = array_filter(variable_get('ajax_comments_node_types', array()));
  if (empty($types) || !empty($types[$node_type])) {
    return TRUE;
  }
  else {
    return FALSE;
  }
}