Posted By

chendrix on 10/29/10


Tagged

wordpress wp admin comments author


Versions (?)

Wordpress dynamically add Admin or Author class to comment


 / Published in: PHP
 

Can now use the class as a styler

  1. <li class="<?php
  2. $comment_author_ID = get_comment(get_comment_ID()) -> user_id;
  3. $auth_ID = get_the_author_meta('ID');
  4. echo ($comment_author_ID == $auth_ID) ? " author " : "" ;
  5. echo (is_super_admin($comment_author_ID)) ? " admin " : '' ;
  6. ?>">

Report this snippet  

You need to login to post a comment.