Changeset 25136
- Timestamp:
- 08/27/2013 01:16:34 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r24573 r25136 23 23 function get_comment_author( $comment_ID = 0 ) { 24 24 $comment = get_comment( $comment_ID ); 25 if ( empty($comment->comment_author) ) { 26 if (!empty($comment->user_id)){27 $user=get_userdata($comment->user_id);28 $author =$user->user_login;29 } else {25 26 if ( empty( $comment->comment_author ) ) { 27 if ( $comment->user_id && $user = get_userdata( $comment->user_id ) ) 28 $author = $user->display_name; 29 else 30 30 $author = __('Anonymous'); 31 }32 31 } else { 33 32 $author = $comment->comment_author; 34 33 } 35 return apply_filters('get_comment_author', $author); 34 35 return apply_filters( 'get_comment_author', $author ); 36 36 } 37 37
Note: See TracChangeset
for help on using the changeset viewer.