From da8af7e038fe7361120769d63ca7359cd1941734 Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Wed, 8 Jan 2025 14:03:44 +0100 Subject: [PATCH] Add a placeholder for missing track titles on the front of the site --- packages/block-library/src/playlist-track/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/playlist-track/index.php b/packages/block-library/src/playlist-track/index.php index edcf1ea5593954..078a6e01672880 100755 --- a/packages/block-library/src/playlist-track/index.php +++ b/packages/block-library/src/playlist-track/index.php @@ -27,7 +27,7 @@ function render_block_core_playlist_track( $attributes ) { $artist = isset( $attributes['artist'] ) ? $attributes['artist'] : ''; $image = isset( $attributes['image'] ) ? $attributes['image'] : ''; $length = isset( $attributes['length'] ) ? $attributes['length'] : ''; - $title = isset( $attributes['title'] ) ? $attributes['title'] : ''; + $title = isset( $attributes['title'] ) && ! empty( $attributes['title'] ) ? $attributes['title'] : __( 'Unknown title' ); $url = isset( $attributes['src'] ) ? $attributes['src'] : ''; $aria_label = $title;