Media: Support title fields to be removed from attachments.

props antpb.
fixes #23932.

Built from https://develop.svn.wordpress.org/trunk@32773


git-svn-id: http://core.svn.wordpress.org/trunk@32744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2015-06-14 20:33:26 +00:00
parent ed46512c20
commit a0f4e8e086
2 changed files with 5 additions and 1 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' ),

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32772';
$wp_version = '4.3-alpha-32773';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.