Making WordPress.org

Changeset 11805


Ignore:
Timestamp:
04/27/2022 11:16:48 AM (2 years ago)
Author:
dd32
Message:

Plugin Directory: Fallback to the user nicename when a committer/support rep doesn't have a display_name set.

Props sharukhajm for the report.
See #6294.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-committers.php

    r9002 r11805  
    5757                    <?php echo get_avatar( $committer->ID, 32 ); ?>
    5858                    <a href="<?php echo esc_url( "https://profiles.wordpress.org/{$committer->user_nicename}/" ); ?>">
    59                         <?php echo Template::encode( $committer->display_name ); ?>
     59                        <?php echo Template::encode( $committer->display_name ?: $committer->user_nicename ); ?>
    6060                    </a><br>
    6161
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-support-reps.php

    r9002 r11805  
    6060                    <?php echo get_avatar( $support_rep->ID, 32 ); ?>
    6161                    <a href="<?php echo esc_url( "https://profiles.wordpress.org/{$support_rep->user_nicename}/" ); ?>">
    62                         <?php echo Template::encode( $support_rep->display_name ); ?>
     62                        <?php echo Template::encode( $support_rep->display_name ?: $support_rep->user_nicename ); ?>
    6363                    </a><br>
    6464
Note: See TracChangeset for help on using the changeset viewer.