Make WordPress Core

Changeset 22138


Ignore:
Timestamp:
10/09/2012 12:21:52 AM (12 years ago)
Author:
koopersmith
Message:

Remove the attachment quick-insert button from the media modal. see #21390.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-views.js

    r22137 r22138  
    521521
    522522    /**
    523      * wp.media.view.Attachment.Library
    524      */
    525     media.view.Attachment.Library = media.view.Attachment.extend({
    526         className: 'attachment library',
    527 
    528         buttons: {
    529             insert: true
    530         },
    531 
    532         events: _.defaults({
    533             'click .insert': 'insert'
    534         }, media.view.Attachment.prototype.events ),
    535 
    536         insert: function() {
    537             this.controller.selection.reset([ this.model ]);
    538             this.controller.update();
    539         }
    540     });
    541 
    542     /**
    543523     * wp.media.view.Attachment.Gallery
    544524     */
     
    651631    media.view.Workspace.Library = media.view.Workspace.extend({
    652632
    653         attachmentsView: {
    654             // The single `Attachment` view to be used in the `Attachments` view.
    655             AttachmentView: media.view.Attachment.Library
    656         },
    657 
    658633        initialize: function() {
    659634            media.view.Workspace.prototype.initialize.apply( this, arguments );
  • trunk/wp-includes/media.php

    r22137 r22138  
    13471347                <a class="close" href="#">&times;</a>
    13481348            <% } %>
    1349 
    1350             <% if ( buttons.insert ) { %>
    1351                 <a class="insert button button-small" href="#"><?php _e( 'Insert' ); ?></a>
    1352             <% } %>
    13531349        </div>
    13541350        <div class="describe"></div>
Note: See TracChangeset for help on using the changeset viewer.