When `MEDIA_TRASH` is true, show the proper context in the `attachment-details` sidebar. Without this fix, it always showed "Delete Permanently."
Props toszcze. Fixes #26783. Built from https://develop.svn.wordpress.org/trunk@27454 git-svn-id: http://core.svn.wordpress.org/trunk@27300 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3b212f7e0f
commit
818bf7c6af
|
@ -1388,7 +1388,8 @@
|
|||
|
||||
.attachment-info .edit-attachment,
|
||||
.attachment-info .refresh-attachment,
|
||||
.attachment-info .delete-attachment {
|
||||
.attachment-info .delete-attachment,
|
||||
.attachment-info .trash-attachment {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
|
@ -1404,11 +1405,13 @@
|
|||
display: block;
|
||||
}
|
||||
|
||||
.attachment-info .delete-attachment {
|
||||
.attachment-info .delete-attachment,
|
||||
.attachment-info .trash-attachment {
|
||||
color: #bc0b0b;
|
||||
}
|
||||
|
||||
.attachment-info .delete-attachment:hover {
|
||||
.attachment-info .delete-attachment:hover,
|
||||
.attachment-info .trash-attachment:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1388,7 +1388,8 @@
|
|||
|
||||
.attachment-info .edit-attachment,
|
||||
.attachment-info .refresh-attachment,
|
||||
.attachment-info .delete-attachment {
|
||||
.attachment-info .delete-attachment,
|
||||
.attachment-info .trash-attachment {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
|
@ -1404,11 +1405,13 @@
|
|||
display: block;
|
||||
}
|
||||
|
||||
.attachment-info .delete-attachment {
|
||||
.attachment-info .delete-attachment,
|
||||
.attachment-info .trash-attachment {
|
||||
color: #bc0b0b;
|
||||
}
|
||||
|
||||
.attachment-info .delete-attachment:hover {
|
||||
.attachment-info .delete-attachment:hover,
|
||||
.attachment-info .trash-attachment:hover {
|
||||
color: red;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5933,6 +5933,7 @@
|
|||
'change [data-setting] select': 'updateSetting',
|
||||
'change [data-setting] textarea': 'updateSetting',
|
||||
'click .delete-attachment': 'deleteAttachment',
|
||||
'click .trash-attachment': 'trashAttachment',
|
||||
'click .edit-attachment': 'editAttachment',
|
||||
'click .refresh-attachment': 'refreshAttachment'
|
||||
},
|
||||
|
@ -5970,7 +5971,17 @@
|
|||
this.model.destroy();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @param {Object} event
|
||||
*/
|
||||
trashAttachment: function( event ) {
|
||||
event.preventDefault();
|
||||
|
||||
this.model.destroy();
|
||||
},
|
||||
/**
|
||||
* @param {Object} event
|
||||
*/
|
||||
editAttachment: function( event ) {
|
||||
event.preventDefault();
|
||||
this.controller.setState( 'edit-image' );
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -217,7 +217,11 @@ function wp_print_media_templates() {
|
|||
<# } #>
|
||||
|
||||
<# if ( ! data.uploading && data.can.remove ) { #>
|
||||
<?php if ( MEDIA_TRASH ): ?>
|
||||
<a class="trash-attachment" href="#"><?php _e( 'Trash' ); ?></a>
|
||||
<?php else: ?>
|
||||
<a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>
|
||||
<?php endif; ?>
|
||||
<# } #>
|
||||
|
||||
<div class="compat-meta">
|
||||
|
|
Loading…
Reference in New Issue