Make WordPress Core

Ticket #40879: 40879.diff

File 40879.diff, 4.2 KB (added by Presskopp, 8 years ago)
  • wp-admin/includes/class-wp-media-list-table.php

     
    142142                if ( MEDIA_TRASH ) {
    143143                        if ( $this->is_trash ) {
    144144                                $actions['untrash'] = __( 'Restore' );
    145                                 $actions['delete'] = __( 'Delete Permanently' );
    146145                        } else {
    147146                                $actions['trash'] = _x( 'Trash', 'verb' );
    148147                        }
    149                 } else {
    150                         $actions['delete'] = __( 'Delete Permanently' );
    151148                }
     149                $actions['delete'] = __( 'Delete Permanently' );
    152150
    153151                if ( $this->detached )
    154152                        $actions['attach'] = __( 'Attach' );
     
    722720                                                esc_attr( sprintf( __( 'Move “%s” to the Trash' ), $att_title ) ),
    723721                                                _x( 'Trash', 'verb' )
    724722                                        );
     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&amp;post=$post->ID", 'delete-post_' . $post->ID ),
     727                                                $delete_ays,
     728                                                /* translators: %s: attachment title */
     729                                                esc_attr( sprintf( __( 'Delete &#8220;%s&#8221; permanently' ), $att_title ) ),
     730                                                __( 'Delete Permanently' )
     731                                        );
    725732                                }
    726733                                if ( $this->is_trash || ! EMPTY_TRASH_DAYS || ! MEDIA_TRASH ) {
    727734                                        $delete_ays = ( !$this->is_trash && !MEDIA_TRASH ) ? " onclick='return showNotice.warn();'" : '';
  • wp-admin/includes/meta-boxes.php

     
    338338        <?php
    339339        if ( current_user_can( 'delete_post', $post->ID ) )
    340340                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                }
    343343                        $delete_ays = ! MEDIA_TRASH ? " onclick='return showNotice.warn();'" : '';
    344344                        echo  "<a class='submitdelete deletion'$delete_ays href='" . get_delete_post_link( $post->ID, null, true ) . "'>" . __( 'Delete Permanently' ) . "</a>";
    345                 }
    346345        ?>
    347346        </div>
    348347
  • wp-includes/media-template.php

     
    433433                                <# if ( ! data.uploading && data.can.remove ) { #> |
    434434                                        <?php if ( MEDIA_TRASH ): ?>
    435435                                                <# 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 />
    437437                                                <# } 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 />
    439439                                                <# } #>
    440                                         <?php else: ?>
    441440                                                <button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button>
    442441                                        <?php endif; ?>
    443442                                <# } #>
     
    536535                                <# if ( ! data.uploading && data.can.remove ) { #>
    537536                                        <?php if ( MEDIA_TRASH ): ?>
    538537                                        <# 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 />
    540539                                        <# } 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 />
    542541                                        <# } #>
    543                                         <?php else: ?>
    544542                                                <button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button>
    545543                                        <?php endif; ?>
    546544                                <# } #>