mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
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:
@@ -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:' ),
|
||||
) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user