diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 7d22dde..0ee6f4c 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -699,7 +699,6 @@ function template_preprocess_comment(&$variables) { ); $variables['author'] = drupal_render($username); $variables['author_id'] = $comment->getOwnerId(); - $variables['author_is_anonymous'] = $comment->getOwner()->isAnonymous(); $variables['new_indicator_timestamp'] = $comment->getChangedTime(); $variables['created'] = format_date($comment->getCreatedTime()); // Avoid calling format_date() twice on the same timestamp. diff --git a/core/modules/comment/templates/comment.html.twig b/core/modules/comment/templates/comment.html.twig index 07bc3b1..27b3296 100644 --- a/core/modules/comment/templates/comment.html.twig +++ b/core/modules/comment/templates/comment.html.twig @@ -5,8 +5,6 @@ * * Available variables: * - author: Comment author. Can be a link or plain text. - * - author_is_anonymous: A flag indicating if the comment was submitted - * anonymously. * - content: The content-related items for the comment display. Use * {{ content }} to print them all, or print a subset such as * {{ content.field_example }}. Use the following code to temporarily suppress @@ -72,7 +70,7 @@ set classes = [ 'comment', status != 'published' ? status, - author_is_anonymous ? 'by-anonymous', + comment.getOwner().isAnonymous() ? 'by-anonymous', author_id and author_id == commented_entity.getOwnerId() ? 'by-' ~ commented_entity.getEntityTypeId() ~ '-author', 'clearfix', ] diff --git a/core/themes/bartik/templates/comment.html.twig b/core/themes/bartik/templates/comment.html.twig index acbffb2..bf43ebc 100644 --- a/core/themes/bartik/templates/comment.html.twig +++ b/core/themes/bartik/templates/comment.html.twig @@ -5,8 +5,6 @@ * * Available variables: * - author: Comment author. Can be a link or plain text. - * - author_is_anonymous: A flag indicating if the comment was submitted - * anonymously. * - content: The content-related items for the comment display. Use * {{ content }} to print them all, or print a subset such as * {{ content.field_example }}. Use the following code to temporarily suppress @@ -70,7 +68,7 @@ set classes = [ 'comment', status != 'published' ? status, - author_is_anonymous ? 'by-anonymous', + comment.getOwner().isAnonymous() ? 'by-anonymous', author_id and author_id == commented_entity.getOwnerId() ? 'by-' ~ commented_entity.getEntityTypeId() ~ '-author', 'clearfix', ]