WordPress.org

Make WordPress Core

Changeset 30737


Ignore:
Timestamp:
12/04/2014 01:58:56 AM (6 years ago)
Author:
wonderboymusic
Message:

Show title, album, and artist info for audio files displayed in WP_Customize_Upload_Control().

See #21483.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/customize-controls.css

    r30712 r30737  
    429429    margin: 0;
    430430    padding: 5px 10px;
     431}
     432
     433.customize-control .attachment-meta {
     434    white-space: nowrap;
     435    overflow: hidden;
     436    text-overflow: ellipsis;
     437    margin: 0;
     438    padding: 5px 10px 0;
     439}
     440
     441.customize-control .attachment-meta-title {
     442    padding-top: 7px;
    431443}
    432444
  • trunk/src/wp-includes/class-wp-customize-control.php

    r30712 r30737  
    750750            <div class="current">
    751751                <div class="container">
    752                     <div class="attachment-media-view {{ data.attachment.orientation }}">
     752                    <div class="attachment-media-view attachment-media-view-{{ data.attachment.type }} {{ data.attachment.orientation }}">
    753753                        <div class="thumbnail thumbnail-{{ data.attachment.type }}">
    754754                            <# if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.medium ) { #>
     
    756756                            <# } else if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.full ) { #>
    757757                                <img class="attachment-thumb" src="{{ data.attachment.sizes.full.url }}" draggable="false" />
     758                            <# } else if ( 'audio' === data.attachment.type ) { #>
     759                                <img class="attachment-thumb type-icon" src="{{ data.attachment.icon }}" class="icon" draggable="false" />
     760                                <p class="attachment-meta attachment-meta-title">&#8220;{{ data.attachment.title }}&#8221;</p>
     761                                <# if ( data.attachment.album || data.attachment.meta.album ) { #>
     762                                <p class="attachment-meta"><em>{{ data.attachment.album || data.attachment.meta.album }}</em></p>
     763                                <# } #>
     764                                <# if ( data.attachment.artist || data.attachment.meta.artist ) { #>
     765                                <p class="attachment-meta">{{ data.attachment.artist || data.attachment.meta.artist }}</p>
     766                                <# } #>
    758767                            <# } else { #>
    759768                                <img class="attachment-thumb type-icon" src="{{ data.attachment.icon }}" class="icon" draggable="false" />
Note: See TracChangeset for help on using the changeset viewer.