Make WordPress Core

Changeset 55251


Ignore:
Timestamp:
02/07/2023 12:06:33 PM (4 years ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

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

    r55171 r55251  
    26392639        <div class="wp-playlist-caption">
    26402640                <span class="wp-playlist-item-meta wp-playlist-item-title">
    2641                 <?php
    2642                         /* translators: %s: Playlist item title. */
    2643                         printf( _x( '&#8220;%s&#8221;', 'playlist item title' ), '{{ data.title }}' );
    2644                 ?>
     2641                        <# if ( data.meta.album || data.meta.artist ) { #>
     2642                                <?php
     2643                                /* translators: %s: Playlist item title. */
     2644                                printf( _x( '&#8220;%s&#8221;', 'playlist item title' ), '{{ data.title }}' );
     2645                                ?>
     2646                        <# } else { #>
     2647                                {{ data.title }}
     2648                        <# } #>
    26452649                </span>
    26462650                <# if ( data.meta.album ) { #><span class="wp-playlist-item-meta wp-playlist-item-album">{{ data.meta.album }}</span><# } #>
    … …  
    26552659                                {{ data.caption }}
    26562660                        <# } else { #>
    2657                                 <span class="wp-playlist-item-title">
    2658                                 <?php
    2659                                         /* translators: %s: Playlist item title. */
    2660                                         printf( _x( '&#8220;%s&#8221;', 'playlist item title' ), '{{{ data.title }}}' );
    2661                                 ?>
    2662                                 </span>
    26632661                                <# if ( data.artists && data.meta.artist ) { #>
    2664                                 <span class="wp-playlist-item-artist"> &mdash; {{ data.meta.artist }}</span>
     2662                                        <span class="wp-playlist-item-title">
     2663                                                <?php
     2664                                                /* translators: %s: Playlist item title. */
     2665                                                printf( _x( '&#8220;%s&#8221;', 'playlist item title' ), '{{{ data.title }}}' );
     2666                                                ?>
     2667                                        </span>
     2668                                        <span class="wp-playlist-item-artist"> &mdash; {{ data.meta.artist }}</span>
     2669                                <# } else { #>
     2670                                        <span class="wp-playlist-item-title">{{{ data.title }}}</span>
    26652671                                <# } #>
    26662672                        <# } #>
Note: See TracChangeset for help on using the changeset viewer.