Make WordPress Core

Ticket #24054: 24054.diff

File 24054.diff, 1.4 KB (added by MikeHansenMe, 9 years ago)

refreshed from src dir

  • src/wp-includes/comment-template.php

     
    420420        // Get the comment type (comment, trackback),
    421421        $classes[] = ( empty( $comment->comment_type ) ) ? 'comment' : $comment->comment_type;
    422422
    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        // If the comment author has an id (registered)
     424        if ( $comment->user_id > 0 && $user = get_userdata( $comment->user_id ) ) {
     425                // For all registered users
    426426                $classes[] = 'byuser';
    427                 $classes[] = 'comment-author-' . sanitize_html_class($user->user_nicename, $comment->user_id);
     427                $classes[] = 'comment-author-' . sanitize_html_class( $user->user_nicename, $comment->user_id );
     428
     429                // For all members of this blog (useful for multi-site)
     430                if ( is_user_member_of_blog( $comment->user_id ) ) {
     431                        $classes[] = 'comment-author-is-site-member';
     432                }
     433
    428434                // For comment authors who are the author of the post
    429435                if ( $post = get_post($post_id) ) {
    430                         if ( $comment->user_id === $post->post_author )
     436                        if ( $comment->user_id === $post->post_author ) {
    431437                                $classes[] = 'bypostauthor';
     438                        }
    432439                }
    433440        }
    434441