| 1 | Index: wp-content/themes/twentythirteen/functions.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-content/themes/twentythirteen/functions.php (revision 23470) |
|---|
| 4 | +++ wp-content/themes/twentythirteen/functions.php (working copy) |
|---|
| 5 | @@ -512,7 +512,26 @@ |
|---|
| 6 | } |
|---|
| 7 | add_filter( 'body_class', 'twentythirteen_body_class' ); |
|---|
| 8 | |
|---|
| 9 | + |
|---|
| 10 | /** |
|---|
| 11 | + * Extends the default WordPress comment class to add 'no-avatars' class |
|---|
| 12 | + * if avatars are disabled in discussion settings. |
|---|
| 13 | + * |
|---|
| 14 | + * @since Twenty Thirteen 1.0 |
|---|
| 15 | + * |
|---|
| 16 | + * @param array $classes Existing class values. |
|---|
| 17 | + * @return array Filtered class values. |
|---|
| 18 | + */ |
|---|
| 19 | +function twentythirteen_comment_class( $classes ) { |
|---|
| 20 | + if ( ! get_option ( 'show_avatars' ) ) |
|---|
| 21 | + $classes[] = 'no-avatars'; |
|---|
| 22 | + |
|---|
| 23 | + return $classes; |
|---|
| 24 | +} |
|---|
| 25 | +add_filter( 'comment_class', 'twentythirteen_comment_class' ); |
|---|
| 26 | + |
|---|
| 27 | + |
|---|
| 28 | +/** |
|---|
| 29 | * Adjusts content_width value for image post formats, video post formats, and |
|---|
| 30 | * image attachment templates. |
|---|
| 31 | * |
|---|
| 32 | Index: wp-content/themes/twentythirteen/style.css |
|---|
| 33 | =================================================================== |
|---|
| 34 | --- wp-content/themes/twentythirteen/style.css (revision 23470) |
|---|
| 35 | +++ wp-content/themes/twentythirteen/style.css (working copy) |
|---|
| 36 | @@ -2263,6 +2263,22 @@ |
|---|
| 37 | font-style: normal; |
|---|
| 38 | } |
|---|
| 39 | |
|---|
| 40 | +.no-avatars .comment-author { |
|---|
| 41 | + float: none; |
|---|
| 42 | + margin: 0 0 5px; |
|---|
| 43 | + max-width: 100%; |
|---|
| 44 | +} |
|---|
| 45 | + |
|---|
| 46 | +.no-avatars .comment-author .fn { |
|---|
| 47 | + line-height: 1.6; |
|---|
| 48 | +} |
|---|
| 49 | + |
|---|
| 50 | +.no-avatars .comment-meta, |
|---|
| 51 | +.no-avatars .comment-content, |
|---|
| 52 | +.no-avatars .reply { |
|---|
| 53 | + width: 100%; |
|---|
| 54 | +} |
|---|
| 55 | + |
|---|
| 56 | .bypostauthor .fn:before { |
|---|
| 57 | content: '\f408'; |
|---|
| 58 | } |
|---|