Make WordPress Core

Ticket #26783: 26783.diff

File 26783.diff, 3.1 KB (added by toszcze, 10 years ago)
  • wp-includes/css/media-views-rtl.css

     
    13461346
    13471347.attachment-info .edit-attachment,
    13481348.attachment-info .refresh-attachment,
    1349 .attachment-info .delete-attachment {
     1349.attachment-info .delete-attachment,
     1350.attachment-info .trash-attachment {
    13501351        display: block;
    13511352        text-decoration: none;
    13521353        white-space: nowrap;
     
    13621363        display: block;
    13631364}
    13641365
    1365 .attachment-info .delete-attachment {
     1366.attachment-info .delete-attachment,
     1367.attachment-info .trash-attachment {
    13661368        color: #bc0b0b;
    13671369}
    13681370
    1369 .attachment-info .delete-attachment:hover {
     1371.attachment-info .delete-attachment:hover,
     1372.attachment-info .trash-attachment:hover {
    13701373        color: red;
    13711374}
    13721375
  • wp-includes/css/media-views.css

     
    13461346
    13471347.attachment-info .edit-attachment,
    13481348.attachment-info .refresh-attachment,
    1349 .attachment-info .delete-attachment {
     1349.attachment-info .delete-attachment,
     1350.attachment-info .trash-attachment {
    13501351        display: block;
    13511352        text-decoration: none;
    13521353        white-space: nowrap;
     
    13621363        display: block;
    13631364}
    13641365
    1365 .attachment-info .delete-attachment {
     1366.attachment-info .delete-attachment,
     1367.attachment-info .trash-attachment {
    13661368        color: #bc0b0b;
    13671369}
    13681370
    1369 .attachment-info .delete-attachment:hover {
     1371.attachment-info .delete-attachment:hover,
     1372.attachment-info .trash-attachment:hover {
    13701373        color: red;
    13711374}
    13721375
  • wp-includes/js/media-views.js

     
    37263726                        'change [data-setting] select':   'updateSetting',
    37273727                        'change [data-setting] textarea': 'updateSetting',
    37283728                        'click .delete-attachment':       'deleteAttachment',
     3729                        'click .trash-attachment':        'trashAttachment',
    37293730                        'click .edit-attachment':         'editAttachment',
    37303731                        'click .refresh-attachment':      'refreshAttachment'
    37313732                },
     
    37513752                                this.model.destroy();
    37523753                },
    37533754
     3755                trashAttachment: function( event ) {
     3756                        event.preventDefault();
     3757
     3758                        this.model.destroy();
     3759                },
     3760
    37543761                editAttachment: function() {
    37553762                        this.$el.addClass('needs-refresh');
    37563763                },
  • wp-includes/media-template.php

     
    218218                                <# } #>
    219219
    220220                                <# if ( ! data.uploading && data.can.remove ) { #>
    221                                         <a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>
     221                                        <?php if ( !MEDIA_TRASH ): ?>
     222                                                <a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>
     223                                        <?php else: ?>
     224                                                <a class="trash-attachment" href="#"><?php _e( 'Trash' ); ?></a>
     225                                        <?php endif; ?>
    222226                                <# } #>
    223227
    224228                                <div class="compat-meta">