WordPress.org

Make WordPress Core

Ticket #21253: 21253.patch

File 21253.patch, 1.8 KB (added by c3mdigital, 3 years ago)
  • wp-admin/includes/class-wp-posts-list-table.php

     
    542542                                        if ( 'trash' == $post->post_status ) 
    543543                                                $actions['untrash'] = "<a title='" . esc_attr( __( 'Restore this item from the Trash' ) ) . "' href='" . wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&amp;action=untrash', $post->ID ) ), 'untrash-' . $post->post_type . '_' . $post->ID ) . "'>" . __( 'Restore' ) . "</a>"; 
    544544                                        elseif ( EMPTY_TRASH_DAYS ) 
    545                                                 $actions['trash'] = "<a class='submitdelete' title='" . esc_attr( __( 'Move this item to the Trash' ) ) . "' href='" . get_delete_post_link( $post->ID ) . "'>" . __( 'Trash' ) . "</a>"; 
     545                                                $actions['trash'] = "<a class='submitdelete' title='" . esc_attr( __( 'Move this item to the Trash' ) ) . "' href='" . wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link .'&amp;action=trash', $post->ID ) ), 'trash-post_' . $post->ID ) . "'>" . __( 'Trash' ) . "</a>"; 
    546546                                        if ( 'trash' == $post->post_status || !EMPTY_TRASH_DAYS ) 
    547                                                 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently' ) ) . "' href='" . get_delete_post_link( $post->ID, '', true ) . "'>" . __( 'Delete Permanently' ) . "</a>"; 
     547                                                $actions['delete'] = "<a class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently' ) ) . "' href='" . wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&amp;action=delete', $post->ID ) ), 'delete-post_' . $post->ID ) . "'>" . __( 'Delete Permanently' ) . "</a>"; 
    548548                                } 
    549549                                if ( $post_type_object->public ) { 
    550550                                        if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) {