Media: Support title fields to be removed from attachments.

props antpb.
fixes #23932.


git-svn-id: https://develop.svn.wordpress.org/trunk@32773 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2015-06-14 20:32:58 +00:00
parent 32845bd9c6
commit 6d8e339608
1 changed files with 4 additions and 0 deletions

View File

@ -378,10 +378,12 @@ function wp_print_media_templates() {
<input type="text" value="{{ data.url }}" readonly />
</label>
<# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>
<?php if ( post_type_supports( 'attachment', 'title' ) ) : ?>
<label class="setting" data-setting="title">
<span class="name"><?php _e('Title'); ?></span>
<input type="text" value="{{ data.title }}" {{ maybeReadOnly }} />
</label>
<?php endif; ?>
<# if ( 'audio' === data.type ) { #>
<?php foreach ( array(
'artist' => __( 'Artist' ),
@ -557,10 +559,12 @@ function wp_print_media_templates() {
<input type="text" value="{{ data.url }}" readonly />
</label>
<# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>
<?php if ( post_type_supports( 'attachment', 'title' ) ) : ?>
<label class="setting" data-setting="title">
<span class="name"><?php _e('Title'); ?></span>
<input type="text" value="{{ data.title }}" {{ maybeReadOnly }} />
</label>
<?php endif; ?>
<# if ( 'audio' === data.type ) { #>
<?php foreach ( array(
'artist' => __( 'Artist' ),