[wp-trac] [WordPress Trac] #16944: Add new 'bynetworkuser' CSS class to output from comment-template.php

WordPress Trac noreply at wordpress.org
Tue Aug 20 11:54:38 UTC 2013


#16944: Add new 'bynetworkuser' CSS class to output from comment-template.php
-----------------------------+----------------------
 Reporter:  jacques_chester  |       Owner:
     Type:  enhancement      |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Comments         |     Version:
 Severity:  normal           |  Resolution:  wontfix
 Keywords:  has-patch        |
-----------------------------+----------------------
Changes (by SergeyBiryukov):

 * status:  reopened => closed
 * resolution:   => wontfix
 * milestone:  3.7 =>


Comment:

 As noted above, this can be done using `comment_class` filter if needed:
 {{{
 function add_by_blog_user_class_16944( $classes, $class, $comment_id ) {
         $comment = get_comment( $comment_id );

         if ( ! is_multisite() || is_user_member_of_blog( $comment->user_id
 ) )
                 $classes[] = 'by-blog-user';

         return $classes;
 }
 add_filter( 'comment_class', 'add_by_blog_user_class_16944', 10, 3 );
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/16944#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list