Making WordPress.org

Changeset 8998


Ignore:
Timestamp:
06/27/2019 12:14:56 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Theme Directory: Don't display the byline if theme author's display name is empty.

Props jonoaldersonwp.
Fixes #4551.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/theme-single.php

    r8895 r8998  
    1717            <div>
    1818                <h3 class="theme-name entry-title" itemprop="name"><?php echo esc_html( $theme->name ); ?></h3>
     19                <?php if ( $theme->author->display_name ) { ?>
    1920                <h4 class="theme-author"><?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '<a href="https://wordpress.org/themes/author/' . $theme->author->user_nicename . '/"><span class="author" itemprop="author">' . esc_html( $theme->author->display_name ) . '</span></a>' ); ?></h4>
     21                <?php } ?>
     22
    2023                <?php if ( is_user_logged_in() && wporg_themes_is_favourited( $theme->slug ) ) { ?>
    2124                    <span class="dashicons dashicons-heart favorite favorited"></span>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/theme.php

    r1489 r8998  
    99        <?php } ?>
    1010        <span class="more-details"><?php _ex( 'More Info', 'theme', 'wporg-themes' ); ?></span>
     11        <?php if ( $theme->author->display_name ) { ?>
    1112        <div class="theme-author"><?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '<span class="author">' . esc_html( $theme->author->display_name ) . '</span>' ); ?></div>
     13        <?php } ?>
    1214        <h3 class="theme-name entry-title"><?php echo esc_html( $theme->name ); ?></h3>
    1315    </a>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-preview.php

    r1481 r8998  
    1010            <div class="install-theme-info">
    1111                <h3 class="theme-name">{{ data.name }}</h3>
     12                <# if ( data.author.display_name ) { #>
    1213                <span class="theme-by"><?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '{{ data.author.display_name }}' ); ?></span>
     14                <# } #>
    1315
    1416                <img class="theme-screenshot" src="{{ data.screenshot_url }}?w=520&strip=all" alt="" />
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-single.php

    r8895 r8998  
    1717            <div>
    1818                <h3 class="theme-name entry-title" itemprop="name">{{{ data.name }}}</h3>
     19                <# if ( data.author.display_name ) { #>
    1920                <h4 class="theme-author"><?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '<a href="{{{ data.path }}}author/{{ data.author.user_nicename }}/"><span class="author" itemprop="author">{{{ data.author.display_name }}}</span></a>' ); ?></h4>
     21                <# } #>
     22
    2023                <# if ( data.show_favorites && data.is_favorited ) { #>
    2124                    <span class="dashicons dashicons-heart favorite favorited"></span>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme.php

    r1489 r8998  
    99        <# } #>
    1010        <span class="more-details"><?php _ex( 'More Info', 'theme', 'wporg-themes' ); ?></span>
     11        <# if ( data.author.display_name ) { #>
    1112        <div class="theme-author"><?php printf( _x( 'By %s', 'theme author', 'wporg-themes' ), '<span class="author">{{ data.author.display_name }}</span>' ); ?></div>
     13        <# } #>
    1214        <h3 class="theme-name entry-title">{{{ data.name }}}</h3>
    1315    </a>
Note: See TracChangeset for help on using the changeset viewer.