Make WordPress Core

Ticket #23558: 23558.5.1.diff

File 23558.5.1.diff, 2.2 KB (added by cdog, 12 years ago)
  • wp-content/themes/twentythirteen/style.css

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

     
    490490 * 1. Custom fonts enabled.
    491491 * 2. Single or multiple authors.
    492492 * 3. Active widgets in the sidebar to change the layout and spacing.
     493 * 4. Show avatars disabled.
    493494 *
    494495 * @since Twenty Thirteen 1.0
    495496 *
     
    497498 * @return array Filtered class values.
    498499 */
    499500function twentythirteen_body_class( $classes ) {
    500 
    501501        // Enable custom font class only if the font CSS is queued to load.
    502502        if ( wp_style_is( 'twentythirteen-fonts', 'queue' ) )
    503503                $classes[] = 'custom-font';
     
    508508        if ( is_active_sidebar( 'sidebar-1' ) && ! is_attachment() && ! is_404() )
    509509                $classes[] = 'sidebar';
    510510
     511        if ( ! get_option ( 'show_avatars' ) )
     512                $classes[] = 'no-avatars';
     513
    511514        return $classes;
    512515}
    513516add_filter( 'body_class', 'twentythirteen_body_class' );
    514517
    515518/**
     519 * Extends the default WordPress comment class to add 'no-avatar' class if
     520 * avatars are disabled in discussion settings.
     521 *
     522 * @since Twenty Thirteen 1.0
     523 *
     524 * @param array $classes Existing class values.
     525 * @return array Filtered class values.
     526 */
     527function twentythirteen_comment_class( $classes ) {
     528        if ( ! get_option ( 'show_avatars' ) )
     529                $classes[] = 'no-avatar';
     530
     531        return $classes;
     532}
     533add_filter( 'comment_class', 'twentythirteen_comment_class' );
     534
     535/**
    516536 * Adjusts content_width value for image post formats, video post formats, and
    517537 * image attachment templates.
    518538 *