From a160712797188ba64000771e2a97ec59f342ef2c Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 7 Feb 2023 12:06:33 +0000 Subject: [PATCH] Media: Remove unwanted quotation marks for playlist template. This changeset improves the way quotation marks are handled in the Playlist template. Follow-up to [27239], [33643 ]. Props hvar, Presskopp, sabernhardt, james-roberts, arrasel403, abidhasan112, robinwpdeveloper, costdev, mukesh27. Fixes #50865. git-svn-id: https://develop.svn.wordpress.org/trunk@55251 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/media.php | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index 389be76f29..01062855a1 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -2638,10 +2638,14 @@ function wp_underscore_playlist_templates() { <# } #>
- + <# if ( data.meta.album || data.meta.artist ) { #> + + <# } else { #> + {{ data.title }} + <# } #> <# if ( data.meta.album ) { #>{{ data.meta.album }}<# } #> <# if ( data.meta.artist ) { #>{{ data.meta.artist }}<# } #> @@ -2654,14 +2658,16 @@ function wp_underscore_playlist_templates() { <# if ( data.caption ) { #> {{ data.caption }} <# } else { #> - - - <# if ( data.artists && data.meta.artist ) { #> - — {{ data.meta.artist }} + + + + — {{ data.meta.artist }} + <# } else { #> + {{{ data.title }}} <# } #> <# } #>