node_comment_mode

Versions
4.6 – 6
node_comment_mode($nid)

Retrieve the comment mode for the given node ID (none, read, or read/write).

▾ 4 functions call node_comment_mode()

comment_links in modules/comment/comment.module
comment_render in modules/comment/comment.module
Renders comment(s).
comment_reply in modules/comment/comment.module
This function is responsible for generating a comment reply form. There are several cases that have to be handled, including:
comment_save in modules/comment/comment.module
Accepts a submission of new or changed comment content.

Code

modules/node/node.module, line 1096

<?php
function node_comment_mode($nid) {
  static $comment_mode;
  if (!isset($comment_mode[$nid])) {
    $comment_mode[$nid] = db_result(db_query('SELECT comment FROM {node} WHERE nid = %d', $nid));
  }
  return $comment_mode[$nid];
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.