Ticket #40879: 40879.diff
File 40879.diff, 4.2 KB (added by , 8 years ago) |
---|
-
wp-admin/includes/class-wp-media-list-table.php
142 142 if ( MEDIA_TRASH ) { 143 143 if ( $this->is_trash ) { 144 144 $actions['untrash'] = __( 'Restore' ); 145 $actions['delete'] = __( 'Delete Permanently' );146 145 } else { 147 146 $actions['trash'] = _x( 'Trash', 'verb' ); 148 147 } 149 } else {150 $actions['delete'] = __( 'Delete Permanently' );151 148 } 149 $actions['delete'] = __( 'Delete Permanently' ); 152 150 153 151 if ( $this->detached ) 154 152 $actions['attach'] = __( 'Attach' ); … … 722 720 esc_attr( sprintf( __( 'Move “%s” to the Trash' ), $att_title ) ), 723 721 _x( 'Trash', 'verb' ) 724 722 ); 723 $delete_ays = ( !$this->is_trash && !MEDIA_TRASH ) ? " onclick='return showNotice.warn();'" : ''; 724 $actions['delete'] = sprintf( 725 '<a href="%s" class="submitdelete aria-button-if-js"%s aria-label="%s">%s</a>', 726 wp_nonce_url( "post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID ), 727 $delete_ays, 728 /* translators: %s: attachment title */ 729 esc_attr( sprintf( __( 'Delete “%s” permanently' ), $att_title ) ), 730 __( 'Delete Permanently' ) 731 ); 725 732 } 726 733 if ( $this->is_trash || ! EMPTY_TRASH_DAYS || ! MEDIA_TRASH ) { 727 734 $delete_ays = ( !$this->is_trash && !MEDIA_TRASH ) ? " onclick='return showNotice.warn();'" : ''; -
wp-admin/includes/meta-boxes.php
338 338 <?php 339 339 if ( current_user_can( 'delete_post', $post->ID ) ) 340 340 if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { 341 echo "<a class='submitdelete deletion' href='" . get_delete_post_link( $post->ID ) . "'>" . _x( 'Trash', 'verb' ) . "</a> ";342 } else {341 echo "<a class='submitdelete deletion' href='" . get_delete_post_link( $post->ID ) . "'>" . _x( 'Trash', 'verb' ) . "</a><br />"; 342 } 343 343 $delete_ays = ! MEDIA_TRASH ? " onclick='return showNotice.warn();'" : ''; 344 344 echo "<a class='submitdelete deletion'$delete_ays href='" . get_delete_post_link( $post->ID, null, true ) . "'>" . __( 'Delete Permanently' ) . "</a>"; 345 }346 345 ?> 347 346 </div> 348 347 -
wp-includes/media-template.php
433 433 <# if ( ! data.uploading && data.can.remove ) { #> | 434 434 <?php if ( MEDIA_TRASH ): ?> 435 435 <# if ( 'trash' === data.status ) { #> 436 <button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button> 436 <button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button><br /><br /> 437 437 <# } else { #> 438 <button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button> 438 <button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button><br /><br /> 439 439 <# } #> 440 <?php else: ?>441 440 <button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button> 442 441 <?php endif; ?> 443 442 <# } #> … … 536 535 <# if ( ! data.uploading && data.can.remove ) { #> 537 536 <?php if ( MEDIA_TRASH ): ?> 538 537 <# if ( 'trash' === data.status ) { #> 539 <button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button> 538 <button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button><br /><br /> 540 539 <# } else { #> 541 <button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button> 540 <button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button><br /><br /> 542 541 <# } #> 543 <?php else: ?>544 542 <button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button> 545 543 <?php endif; ?> 546 544 <# } #>