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.



git-svn-id: https://develop.svn.wordpress.org/trunk@27862 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-03-30 19:27:31 +00:00
parent a9d54abfed
commit 149f36ed35
5 changed files with 93 additions and 23 deletions
+9 -4
View File
@@ -2661,10 +2661,14 @@ function edit_form_image_editor( $post ) {
</div>
<div class="wp_attachment_details edit-form-section">
<p>
<label for="attachment_caption"><strong><?php _e( 'Caption' ); ?></strong></label><br />
<label for="attachment_caption"><strong><?php _e( 'Caption' ); ?></strong><?php
if ( preg_match( '#^audio|video#', $post->post_mime_type ) ): ?>: <?php
_e( "Custom label for item in a playlist. If empty, the file's available data is used." );
endif ?></label><br />
<textarea class="widefat" name="excerpt" id="attachment_caption"><?php echo $post->post_excerpt; ?></textarea>
</p>
<?php if ( 'image' === substr( $post->post_mime_type, 0, 5 ) ) : ?>
<p>
<label for="attachment_alt"><strong><?php _e( 'Alternative Text' ); ?></strong></label><br />
@@ -2683,7 +2687,10 @@ function edit_form_image_editor( $post ) {
);
?>
<label for="content"><strong><?php _e( 'Description' ); ?></strong></label>
<label for="content"><strong><?php _e( 'Description' ); ?></strong><?php
if ( preg_match( '#^audio|video#', $post->post_mime_type ) ): ?>: <?php
_e( 'Displayed on attachment pages.' );
endif ?></label>
<?php wp_editor( $post->post_content, 'attachment_content', $editor_args ); ?>
</div>
@@ -2765,8 +2772,6 @@ function attachment_submitbox_metadata() {
*/
$fields = apply_filters( 'media_submitbox_misc_sections', array(
'mime_type' => __( 'Mime-type:' ),
'year' => __( 'Year:' ),
'genre' => __( 'Genre:' ),
'length_formatted' => __( 'Length:' ),
) );