WordPress.org

Make WordPress Core

Ticket #16944: byuser.diff

File byuser.diff, 1.1 KB (added by jacques_chester, 3 years ago)

Preliminary diff

  • .php

    old new  
    306306        // Get the comment type (comment, trackback), 
    307307        $classes[] = ( empty( $comment->comment_type ) ) ? 'comment' : $comment->comment_type; 
    308308 
    309         // If the comment author has an id (registered), then print the log in name 
     309        // If the comment author has an id (registered) for the network, then print the log in name 
    310310        if ( $comment->user_id > 0 && $user = get_userdata($comment->user_id) ) { 
    311311                // For all registered users, 'byuser' 
    312                 $classes[] = 'byuser'; 
     312                $classes[] = 'bynetworkuser'; 
    313313                $classes[] = 'comment-author-' . sanitize_html_class($user->user_nicename, $comment->user_id); 
    314314                // For comment authors who are the author of the post 
    315315                if ( $post = get_post($post_id) ) { 
     
    317317                                $classes[] = 'bypostauthor'; 
    318318                } 
    319319        } 
     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        } 
    320325 
    321326        if ( empty($comment_alt) ) 
    322327                $comment_alt = 0;