mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-28 15:17:42 +02:00
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:
parent
9aa9bda5d3
commit
236ecdd8f4
@ -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
Block a user