Make WordPress Core

Changeset 32773


Ignore:
Timestamp:
06/14/2015 08:32:58 PM (9 years ago)
Author:
nacin
Message:

Media: Support title fields to be removed from attachments.

props antpb.
fixes #23932.

File:
1 edited

Legend:

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

    r32609 r32773  
    379379                </label>
    380380                <# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>
     381                <?php if ( post_type_supports( 'attachment', 'title' ) ) : ?>
    381382                <label class="setting" data-setting="title">
    382383                    <span class="name"><?php _e('Title'); ?></span>
    383384                    <input type="text" value="{{ data.title }}" {{ maybeReadOnly }} />
    384385                </label>
     386                <?php endif; ?>
    385387                <# if ( 'audio' === data.type ) { #>
    386388                <?php foreach ( array(
     
    558560        </label>
    559561        <# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #>
     562        <?php if ( post_type_supports( 'attachment', 'title' ) ) : ?>
    560563        <label class="setting" data-setting="title">
    561564            <span class="name"><?php _e('Title'); ?></span>
    562565            <input type="text" value="{{ data.title }}" {{ maybeReadOnly }} />
    563566        </label>
     567        <?php endif; ?>
    564568        <# if ( 'audio' === data.type ) { #>
    565569        <?php foreach ( array(
Note: See TracChangeset for help on using the changeset viewer.