mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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. Built from https://develop.svn.wordpress.org/trunk@29105 git-svn-id: http://core.svn.wordpress.org/trunk@28891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
59ffcf668b
commit
ba688f4ff9
@ -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.
|
||||
|
4
wp-includes/js/media-views.min.js
vendored
4
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
@ -522,6 +522,17 @@ function wp_print_media_templates() {
|
||||
<span class="name"><?php _e('Title'); ?></span>
|
||||
<input type="text" value="{{ data.title }}" {{ maybeReadOnly }} />
|
||||
</label>
|
||||
<# if ( 'audio' === data.type ) { #>
|
||||
<?php foreach ( array(
|
||||
'artist' => __( 'Artist' ),
|
||||
'album' => __( 'Album' ),
|
||||
) as $key => $label ) : ?>
|
||||
<label class="setting" data-setting="<?php echo esc_attr( $key ) ?>">
|
||||
<span class="name"><?php echo $label ?></span>
|
||||
<input type="text" value="{{ data.<?php echo $key ?> || data.meta.<?php echo $key ?> || '' }}" />
|
||||
</label>
|
||||
<?php endforeach; ?>
|
||||
<# } #>
|
||||
<label class="setting" data-setting="caption">
|
||||
<span class="name"><?php _e('Caption'); ?></span>
|
||||
<textarea {{ maybeReadOnly }}>{{ data.caption }}</textarea>
|
||||
|
Loading…
Reference in New Issue
Block a user