Ticket #16944: byuser.diff
| File byuser.diff, 1.1 KB (added by jacques_chester, 2 years ago) |
|---|
-
.php
old new 306 306 // Get the comment type (comment, trackback), 307 307 $classes[] = ( empty( $comment->comment_type ) ) ? 'comment' : $comment->comment_type; 308 308 309 // If the comment author has an id (registered) , then print the log in name309 // If the comment author has an id (registered) for the network, then print the log in name 310 310 if ( $comment->user_id > 0 && $user = get_userdata($comment->user_id) ) { 311 311 // For all registered users, 'byuser' 312 $classes[] = 'by user';312 $classes[] = 'bynetworkuser'; 313 313 $classes[] = 'comment-author-' . sanitize_html_class($user->user_nicename, $comment->user_id); 314 314 // For comment authors who are the author of the post 315 315 if ( $post = get_post($post_id) ) { … … 317 317 $classes[] = 'bypostauthor'; 318 318 } 319 319 } 320 321 // If the user belongs to this blog, give them a byuser CSS class 322 if ( is_user_member_of_blog( $comment->user_id, get_current_blog_id() ) ) { 323 $classes[] = 'byuser'; 324 } 320 325 321 326 if ( empty($comment_alt) ) 322 327 $comment_alt = 0;