WordPress.org

Make WordPress Core

Ticket #23558: 23558.5.diff

File 23558.5.diff, 1.5 KB (added by SriniG, 5 years ago)
  • wp-content/themes/twentythirteen/functions.php

     
    512512}
    513513add_filter( 'body_class', 'twentythirteen_body_class' );
    514514
     515
    515516/**
     517 * Extends the default WordPress comment class to add 'no-avatars' class
     518 * if avatars are disabled in discussion settings.
     519 *
     520 * @since Twenty Thirteen 1.0
     521 *
     522 * @param array $classes Existing class values.
     523 * @return array Filtered class values.
     524 */
     525function twentythirteen_comment_class( $classes ) {
     526        if ( ! get_option ( 'show_avatars' ) )
     527                $classes[] = 'no-avatars';
     528
     529        return $classes;
     530}
     531add_filter( 'comment_class', 'twentythirteen_comment_class' );
     532
     533
     534/**
    516535 * Adjusts content_width value for image post formats, video post formats, and
    517536 * image attachment templates.
    518537 *
  • wp-content/themes/twentythirteen/style.css

     
    22632263        font-style: normal;
    22642264}
    22652265
     2266.no-avatars .comment-author {
     2267        float: none;
     2268        margin: 0 0 5px;
     2269        max-width: 100%;
     2270}
     2271
     2272.no-avatars .comment-author .fn {
     2273        line-height: 1.6;
     2274}
     2275
     2276.no-avatars .comment-meta,
     2277.no-avatars .comment-content,
     2278.no-avatars .reply {
     2279        width: 100%;
     2280}
     2281
    22662282.bypostauthor .fn:before {
    22672283        content: '\f408';
    22682284}