Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created September 30, 2013 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/6763911 to your computer and use it in GitHub Desktop.
Save billerickson/6763911 to your computer and use it in GitHub Desktop.
<?php
/**
* Admin Label
*
* @author Bill Erickson
* @link http://www.billerickson.net/fun-avatars/
*
* @param array $classes, list of all classes
* @return array $classes, list of all classes
*/
function be_admin_label( $classes ) {
$comment = get_comment();
if ( $comment->user_id > 0 && user_can( $comment->user_id, 'manage_options' ) )
$classes[] = 'byadmin';
return $classes;
}
add_filter( 'comment_class', 'be_admin_label' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment