Make WordPress Core


Ignore:
Timestamp:
03/30/2014 07:27:31 PM (13 years ago)
Author:
wonderboymusic
Message:

Metadata for audio and video files:

  • Make attachment metadata for audio files editable by providing a metabox on the Edit Media page
  • Standardize on using the attachment title everywhere
  • Label the Caption and Description fields for audio and video appropriately
  • Make the playlist Underscore templates more straightforward

See #27574.

File:
1 edited

Legend:

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

    r27695 r27862  
    26622662        <div class="wp_attachment_details edit-form-section">
    26632663                <p>
    2664                         <label for="attachment_caption"><strong><?php _e( 'Caption' ); ?></strong></label><br />
     2664                        <label for="attachment_caption"><strong><?php _e( 'Caption' ); ?></strong><?php
     2665                        if ( preg_match( '#^audio|video#', $post->post_mime_type ) ): ?>: <?php
     2666                                _e( "Custom label for item in a playlist. If empty, the file's available data is used." );
     2667                        endif ?></label><br />
    26652668                        <textarea class="widefat" name="excerpt" id="attachment_caption"><?php echo $post->post_excerpt; ?></textarea>
    26662669                </p>
     2670
    26672671
    26682672        <?php if ( 'image' === substr( $post->post_mime_type, 0, 5 ) ) : ?>
    … …  
    26842688        ?>
    26852689
    2686         <label for="content"><strong><?php _e( 'Description' ); ?></strong></label>
     2690        <label for="content"><strong><?php _e( 'Description' ); ?></strong><?php
     2691        if ( preg_match( '#^audio|video#', $post->post_mime_type ) ): ?>: <?php
     2692                _e( 'Displayed on attachment pages.' );
     2693        endif ?></label>
    26872694        <?php wp_editor( $post->post_content, 'attachment_content', $editor_args ); ?>
    26882695
    … …  
    27662773                $fields = apply_filters( 'media_submitbox_misc_sections', array(
    27672774                        'mime_type'        => __( 'Mime-type:' ),
    2768                         'year'             => __( 'Year:' ),
    2769                         'genre'            => __( 'Genre:' ),
    27702775                        'length_formatted' => __( 'Length:' ),
    27712776                ) );
Note: See TracChangeset for help on using the changeset viewer.