WordPress.org

Support

Support » Requests and Feedback » REQUEST-PROPOSAL: get_comment_author @ comment-template.php

REQUEST-PROPOSAL: get_comment_author @ comment-template.php

  • The administrator should select what will appear as comment author (nickname, display name, full name) for registered users.
    This feature is very useful for “closed” blogs requiring to be registered in order to post comments.

    At this case the check at get_comment_author should be something like the following:

    if (!empty($comment->user_id)) {
        $user=get_userdata($comment->user_id);
        $author=$user->display_name; // or whatever the admin selects
      } else {
        if ( empty($comment->comment_author) ) {
          $author = __('Anonymous');
        } else {
          $author = $comment->comment_author;
        }
      }
      return apply_filters('get_comment_author', $author);
    }

  • The topic ‘REQUEST-PROPOSAL: get_comment_author @ comment-template.php’ is closed to new replies.
Skip to toolbar