From 40fd54aedee161cbfa10d352053082ccc1d2c02a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 19 Oct 2021 23:07:42 +0000 Subject: [PATCH] Help/About: Don't output empty `` 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. git-svn-id: https://develop.svn.wordpress.org/trunk@51920 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/credits.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/credits.php b/src/wp-admin/includes/credits.php index c6ff5e79ea..833b676cec 100644 --- a/src/wp-admin/includes/credits.php +++ b/src/wp-admin/includes/credits.php @@ -154,7 +154,7 @@ function wp_credits_section_list( $credits = array(), $slug = '' ) { $data2x = get_avatar_data( $person_data[1] . '@md5.gravatar.com', array( 'size' => $size * 2 ) ); echo '' . "\n"; echo esc_html( $person_data[0] ) . "\n\t"; - if ( ! $compact ) { + if ( ! $compact && ! empty( $person_data[3] ) ) { // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction,WordPress.WP.I18n.NonSingularStringLiteralText echo '' . translate( $person_data[3] ) . "\n"; }