theme_comment_post_forbidden

5 comment.module theme_comment_post_forbidden($nid)
6 comment.module theme_comment_post_forbidden($node)
7 comment.module theme_comment_post_forbidden($variables)
8 comment.module theme_comment_post_forbidden($variables)

2 theme calls to theme_comment_post_forbidden()

File

modules/comment.module, line 1599
Enables users to comment on published content.

Code

function theme_comment_post_forbidden() {
  global $user;
  if ($user->uid) {
    return t("you can't post comments");
  }
  else {
    if (variable_get('user_register', 1)) {
      return t('<a href="%login">login</a> or <a href="%register">register</a> to post comments', array('%login' => url('user/login'), '%register' => url('user/register')));
    }
    else {
      return t('<a href="%login">login</a> to post comments', array('%login' => url('user/login')));
    }
  }
}
Login or register to post comments