Skip to content

Instantly share code, notes, and snippets.

@sproutventure
Created February 24, 2010 01:27
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 sproutventure/312963 to your computer and use it in GitHub Desktop.
Save sproutventure/312963 to your computer and use it in GitHub Desktop.
// Create and array of all parent comments
$parents = array();
foreach ($comments as $cmnt) {
$parents[] = $cmnt->comment_parent;
}
// If the comment ID is in the array of parent above add a class
if ( in_array( $comment->comment_ID, $parents ) ){
$c[] = 'threaded-comment';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment