WordPress.org

Make WordPress Core

Changeset 23498


Ignore:
Timestamp:
02/27/2013 04:25:14 AM (5 years ago)
Author:
lancewillett
Message:

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

Location:
trunk/wp-content/themes/twentythirteen
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentythirteen/functions.php

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

    r23497 r23498  
    22452245}
    22462246
     2247.no-avatars .comment-author {
     2248    float: none;
     2249    margin: 0 0 5px;
     2250    max-width: 100%;
     2251}
     2252
     2253.no-avatars .comment-meta,
     2254.no-avatars .comment-content,
     2255.no-avatars .reply {
     2256    width: 100%;
     2257}
     2258
    22472259.bypostauthor .fn:before {
    22482260    content: '\f408';
Note: See TracChangeset for help on using the changeset viewer.