Ejemplo n.º 1
0
function rename_anonymous_name()
{
    global $comment;
    if (empty($comment->comment_author)) {
        if (!empty($comment->user_id)) {
            $user = get_userdata($comment->user_id);
            $author = $user->user_login;
        } else {
            $author = get_theme_text_comment_anonymous_name();
            //匿名ユーザー名の取得
        }
    } else {
        $author = $comment->comment_author;
    }
    return $author;
}
Ejemplo n.º 2
0
 function rename_anonymous_name($author = '')
 {
     //global $comment;
     if (!$author || $author == __('Anonymous')) {
         $author = get_theme_text_comment_anonymous_name();
         //匿名ユーザー名の取得
         //} else {
         // if( empty( $comment->comment_author ) ) {
         //   if( !empty( $comment->user_id ) ) {
         //     $user = get_userdata( $comment->user_id );
         //     $author = $user->user_login;
         //   } else {
         //     $author = get_theme_text_comment_anonymous_name();//匿名ユーザー名の取得
         //   }
         // } else {
         //   $author = $comment->comment_author;
         // }
     }
     return $author;
 }