Remove the attachment quick-insert button from the media modal. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
aa19c0d66c
commit
108b0feaed
|
@ -519,26 +519,6 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* wp.media.view.Attachment.Library
|
|
||||||
*/
|
|
||||||
media.view.Attachment.Library = media.view.Attachment.extend({
|
|
||||||
className: 'attachment library',
|
|
||||||
|
|
||||||
buttons: {
|
|
||||||
insert: true
|
|
||||||
},
|
|
||||||
|
|
||||||
events: _.defaults({
|
|
||||||
'click .insert': 'insert'
|
|
||||||
}, media.view.Attachment.prototype.events ),
|
|
||||||
|
|
||||||
insert: function() {
|
|
||||||
this.controller.selection.reset([ this.model ]);
|
|
||||||
this.controller.update();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wp.media.view.Attachment.Gallery
|
* wp.media.view.Attachment.Gallery
|
||||||
*/
|
*/
|
||||||
|
@ -650,11 +630,6 @@
|
||||||
*/
|
*/
|
||||||
media.view.Workspace.Library = media.view.Workspace.extend({
|
media.view.Workspace.Library = media.view.Workspace.extend({
|
||||||
|
|
||||||
attachmentsView: {
|
|
||||||
// The single `Attachment` view to be used in the `Attachments` view.
|
|
||||||
AttachmentView: media.view.Attachment.Library
|
|
||||||
},
|
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
media.view.Workspace.prototype.initialize.apply( this, arguments );
|
media.view.Workspace.prototype.initialize.apply( this, arguments );
|
||||||
|
|
||||||
|
|
|
@ -1346,10 +1346,6 @@ function wp_print_media_templates( $attachment ) {
|
||||||
<% if ( buttons.close ) { %>
|
<% if ( buttons.close ) { %>
|
||||||
<a class="close" href="#">×</a>
|
<a class="close" href="#">×</a>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<% if ( buttons.insert ) { %>
|
|
||||||
<a class="insert button button-small" href="#"><?php _e( 'Insert' ); ?></a>
|
|
||||||
<% } %>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="describe"></div>
|
<div class="describe"></div>
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue