From 16a70197ed67476535b3f1dc331de838c210faac Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 11 Jul 2014 21:01:08 +0000 Subject: [PATCH] In the Post/Select frames, for audio files: * Show `artist` and `album` fields in the Attachment Details sidebar * Sync their values on `change` See #28839. git-svn-id: https://develop.svn.wordpress.org/trunk@29105 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/media-views.js | 2 ++ src/wp-includes/media-template.php | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/wp-includes/js/media-views.js b/src/wp-includes/js/media-views.js index 92085ce621..eab3c87794 100644 --- a/src/wp-includes/js/media-views.js +++ b/src/wp-includes/js/media-views.js @@ -4633,6 +4633,8 @@ this.model.on( 'change', this.render, this ); this.model.on( 'change:title', this._syncTitle, this ); this.model.on( 'change:caption', this._syncCaption, this ); + this.model.on( 'change:artist', this._syncArtist, this ); + this.model.on( 'change:album', this._syncAlbum, this ); this.model.on( 'change:percent', this.progress, this ); // Update the selection. diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index b9cc9111be..be9b6dc1ea 100644 --- a/src/wp-includes/media-template.php +++ b/src/wp-includes/media-template.php @@ -522,6 +522,17 @@ function wp_print_media_templates() { + <# if ( 'audio' === data.type ) { #> + __( 'Artist' ), + 'album' => __( 'Album' ), + ) as $key => $label ) : ?> + + + <# } #>