mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Media: Render attachment custom fields for new uploads.
Initialize attachment custom fields during the `add` callback, so that fields are present as soon as an attachment is uploaded but do not refresh when field values are changed. Follow up to #40909. Props trepmal, adamsilverstein, joedolson. Fixes #58051. git-svn-id: https://develop.svn.wordpress.org/trunk@55649 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
68514c5136
commit
ce28deee43
@ -24,6 +24,11 @@ AttachmentCompat = View.extend(/** @lends wp.media.view.AttachmentCompat.prototy
|
||||
'change textarea': 'save'
|
||||
},
|
||||
|
||||
initialize: function() {
|
||||
// Render the view when a new item is added.
|
||||
this.listenTo( this.model, 'add', this.render );
|
||||
},
|
||||
|
||||
/**
|
||||
* @return {wp.media.view.AttachmentCompat} Returns itself to allow chaining.
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user