Make WordPress Core

Changeset 51920


Ignore:
Timestamp:
10/19/2021 11:07:42 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Help/About: Don't output empty <span> tags on Credits screen.

If the contributor does not have a title, the empty tags are not necessary.

Follow-up to [17877], [17909], [17942], [18162], [19143], [46709].

Props sayedulsayem, audrasjb, mukesh27.
Fixes #54275.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/credits.php

    r51264 r51920  
    155155                echo '<span class="wp-person-avatar"><img src="' . esc_url( $data['url'] ) . '" srcset="' . esc_url( $data2x['url'] ) . ' 2x" class="gravatar" alt="" /></span>' . "\n";
    156156                echo esc_html( $person_data[0] ) . "</a>\n\t";
    157                 if ( ! $compact ) {
     157                if ( ! $compact && ! empty( $person_data[3] ) ) {
    158158                    // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText
    159159                    echo '<span class="title">' . translate( $person_data[3] ) . "</span>\n";
Note: See TracChangeset for help on using the changeset viewer.