diff --git a/comment_limit.module b/comment_limit.module index 70e34bfd..7f5c8d7d 100644 --- a/comment_limit.module +++ b/comment_limit.module @@ -45,7 +45,11 @@ function comment_limit_node_load($nodes, $types) { foreach ($nodes as $node) { $node->comment_limit = FALSE; // Check for limit and remove form - if ($result = comment_limit_reached($node, $user)) { + + //alter comment limit functionality based on other criteria. + drupal_alter('comment_limit_load', $node); + + if ($node->comment != COMMENT_NODE_CLOSED && $result = comment_limit_reached($node, $user)) { // Close comments $node->comment = COMMENT_NODE_CLOSED; // Set comment_limit status.