Pastoid

The page you are looking at now is at this URL: http://pastoid.com/a3o

This paste was last updated on July 2, 2009 at 3:00 pm.

Pasted Coderaw

	public function k2_comment_class( $comment, $post )
	{
		static $toggle = 0;
 
		$classes = array();
		if ( $comment->status == Comment::STATUS_UNAPPROVED ) {
			$classes[] = 'comment-unapproved';
		}
		else {
			$classes[] = $toggle++ %2 == 0 ? 'even' : 'odd';
		}
		// check to see if the comment is by a registered user
		if ( $u = User::get( $comment->email ) ) {
			$classes[] = 'byuser';
			$classes[] = 'comment-author-' . Utils::slugify( $u->displayname );
		}
		if( $comment->email == $post->author->email ) {
			$classes[] = 'bypostauthor';
		}
 
		return 'class="'.implode(' ', $classes) . '"';
	}
 
 

Toggle wordwrap

Referring DomainHits
Unknown Referer 106
pastoid.com 7
drunkenmonkey.org 1
Is this paste spam?
<Hide