Twenty Thirteen: style comments correctly when show_avatars option is turned off in Discussion settings. Props SriniG, fixes #23558.

git-svn-id: http://core.svn.wordpress.org/trunk@23498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2013-02-27 04:25:14 +00:00
parent 9aa9bda5d3
commit 236ecdd8f4
2 changed files with 29 additions and 0 deletions

View File

@ -512,6 +512,23 @@ function twentythirteen_body_class( $classes ) {
}
add_filter( 'body_class', 'twentythirteen_body_class' );
/**
* Extends the default WordPress comment class to add 'no-avatars' class
* if avatars are disabled in discussion settings.
*
* @since Twenty Thirteen 1.0
*
* @param array $classes Existing class values.
* @return array Filtered class values.
*/
function twentythirteen_comment_class( $classes ) {
if ( ! get_option ( 'show_avatars' ) )
$classes[] = 'no-avatars';
return $classes;
}
add_filter( 'comment_class', 'twentythirteen_comment_class' );
/**
* Adjusts content_width value for image post formats, video post formats, and
* image attachment templates.

View File

@ -2244,6 +2244,18 @@ footer.entry-meta {
font-style: normal;
}
.no-avatars .comment-author {
float: none;
margin: 0 0 5px;
max-width: 100%;
}
.no-avatars .comment-meta,
.no-avatars .comment-content,
.no-avatars .reply {
width: 100%;
}
.bypostauthor .fn:before {
content: '\f408';
}