Twenty Thirteen: style comments correctly when `show_avatars` option is turned off in Discussion settings. Props SriniG, fixes #23558.
git-svn-id: https://develop.svn.wordpress.org/trunk@23498 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6a7684d99f
commit
ac4ab9cd60
|
@ -512,6 +512,23 @@ function twentythirteen_body_class( $classes ) {
|
||||||
}
|
}
|
||||||
add_filter( 'body_class', 'twentythirteen_body_class' );
|
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
|
* Adjusts content_width value for image post formats, video post formats, and
|
||||||
* image attachment templates.
|
* image attachment templates.
|
||||||
|
|
|
@ -2244,6 +2244,18 @@ footer.entry-meta {
|
||||||
font-style: normal;
|
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 {
|
.bypostauthor .fn:before {
|
||||||
content: '\f408';
|
content: '\f408';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue