You are here

function _comment_perm_admin_comment_status_info in Comment Permissions 7.2

Get info about comment status for a specific node type.

Parameters

string $type: Content type machine name.

Return value

string Status message.

1 call to _comment_perm_admin_comment_status_info()
comment_perm_admin_settings in ./comment_perm.admin.inc
Menu callback; presents the comment_perm settings page.

File

./comment_perm.admin.inc, line 52
Administration pages for Comment Permissions module.

Code

function _comment_perm_admin_comment_status_info($type) {
  switch (variable_get('comment_' . $type, COMMENT_NODE_OPEN)) {
    case COMMENT_NODE_CLOSED:
      $status = t('<em>(comments are currently read only)</em>');
      break;
    case COMMENT_NODE_OPEN:
    default:
      $status = '';
      break;
    case COMMENT_NODE_HIDDEN:
      $status = t('<em>(comments are currently disabled)</em>');
      break;
  }
  return $status;
}