Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve overall comments markup #11

Merged
merged 12 commits into from Jan 18, 2020
Prev

Use `.h-entry` for comments originating on the site

  • Loading branch information
jeremyfelt committed Jan 18, 2020
commit 1b4a94de261173e5e6b17d4706c49e58b36a5640
@@ -56,7 +56,16 @@ function remove_comment_classes( $classes, $class, $comment_id, $comment, $post_

// Re-add the classes that should always be there.
$classes[] = 'u-comment';
$classes[] = 'h-cite';

$protocol = get_comment_meta( $comment_id, 'protocol', true );

// If the comment originated somewhere else, mark it as a citation. If it originated
// on this site, mark it as an entry.
if ( '' === $comment->comment_type && 'webmention' !== $protocol ) {
$classes[] = 'h-entry';
} else {
$classes[] = 'h-cite';
}

return $classes;
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.