Changeset 31518
- Timestamp:
- 02/23/2015 02:51:49 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r31459 r31518 421 421 $classes[] = ( empty( $comment->comment_type ) ) ? 'comment' : $comment->comment_type; 422 422 423 // If the comment author has an id (registered), then print the log in name 424 if ( $comment->user_id > 0 && $user = get_userdata($comment->user_id) ) { 425 // For all registered users, 'byuser' 423 // Add classes for comment authors that are registered users. 424 if ( $comment->user_id > 0 && $user = get_userdata( $comment->user_id ) ) { 426 425 $classes[] = 'byuser'; 427 $classes[] = 'comment-author-' . sanitize_html_class($user->user_nicename, $comment->user_id); 426 $classes[] = 'comment-author-' . sanitize_html_class( $user->user_nicename, $comment->user_id ); 427 428 // If a comment author is also a member of the site (multisite). 429 if ( is_user_member_of_blog( $comment->user_id ) ) { 430 $classes[] = 'comment-author-is-site-member'; 431 } 432 428 433 // For comment authors who are the author of the post 429 434 if ( $post = get_post($post_id) ) { 430 if ( $comment->user_id === $post->post_author ) 435 if ( $comment->user_id === $post->post_author ) { 431 436 $classes[] = 'bypostauthor'; 437 } 432 438 } 433 439 }
Note: See TracChangeset
for help on using the changeset viewer.