diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css
index 245bf599d0..3de0445232 100644
a
|
b
|
table.form-table td .updated p { |
1202 | 1202 | color: #72777c; |
1203 | 1203 | } |
1204 | 1204 | |
| 1205 | .privacy_requests .row-actions .remove-personal-data, |
| 1206 | .privacy_requests .row-actions .export-personal-data { |
| 1207 | display: inline-block; |
| 1208 | } |
| 1209 | |
1205 | 1210 | .privacy_requests tbody .has-request-results th { |
1206 | 1211 | box-shadow: none; |
1207 | 1212 | } |
diff --git a/src/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php b/src/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php
index 683ea69697..6d9fc55b57 100644
a
|
b
|
class WP_Privacy_Data_Export_Requests_List_Table extends WP_Privacy_Requests_Tab |
63 | 63 | |
64 | 64 | $download_data_markup .= '</div>'; |
65 | 65 | |
| 66 | $resend_confirmation_markup = '<span>'; |
| 67 | $resend_confirmation_markup .= sprintf( |
| 68 | '<a href="%s" class="resend-confirmation" aria-label="%s">%s</a>', |
| 69 | esc_url( |
| 70 | wp_nonce_url( |
| 71 | add_query_arg( |
| 72 | array( |
| 73 | 'action' => 'resend', |
| 74 | 'request_id' => array( $request_id ), |
| 75 | ), |
| 76 | admin_url( 'export-personal-data.php' ) |
| 77 | ), |
| 78 | 'bulk-privacy_requests' |
| 79 | ) |
| 80 | ), |
| 81 | esc_attr( |
| 82 | sprintf( |
| 83 | /* translators: %s: Request email. */ |
| 84 | __( 'Resend export confirmation request to “%s”.' ), |
| 85 | $item->email |
| 86 | ) |
| 87 | ), |
| 88 | __( 'Resend Confirmation Request' ) |
| 89 | ); |
| 90 | $resend_confirmation_markup .= '</span>'; |
| 91 | |
| 92 | $delete_request_markup = '<span class="trash">'; |
| 93 | $delete_request_markup .= sprintf( |
| 94 | '<a href="%s" class="delete-request" aria-label="%s">%s</a>', |
| 95 | esc_url( |
| 96 | wp_nonce_url( |
| 97 | add_query_arg( |
| 98 | array( |
| 99 | 'action' => 'delete', |
| 100 | 'request_id' => array( $request_id ), |
| 101 | ), |
| 102 | admin_url( 'export-personal-data.php' ) |
| 103 | ), |
| 104 | 'bulk-privacy_requests' |
| 105 | ) |
| 106 | ), |
| 107 | esc_attr( |
| 108 | sprintf( |
| 109 | /* translators: %s: Request email. */ |
| 110 | __( 'Delete export request for “%s”.' ), |
| 111 | $item->email |
| 112 | ) |
| 113 | ), |
| 114 | __( 'Delete Request' ) |
| 115 | ); |
| 116 | $delete_request_markup .= '</span>'; |
| 117 | |
66 | 118 | $row_actions = array( |
67 | | 'download-data' => $download_data_markup, |
| 119 | 'download-data' => $download_data_markup, |
| 120 | 'resend-confirmation' => $resend_confirmation_markup, |
| 121 | 'delete-request' => $delete_request_markup, |
68 | 122 | ); |
69 | 123 | |
70 | 124 | return sprintf( '<a href="%1$s">%2$s</a> %3$s', esc_url( 'mailto:' . $item->email ), $item->email, $this->row_actions( $row_actions ) ); |
diff --git a/src/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php b/src/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php
index 8e2efa0379..95373a604a 100644
a
|
b
|
class WP_Privacy_Data_Removal_Requests_List_Table extends WP_Privacy_Requests_Ta |
68 | 68 | |
69 | 69 | $remove_data_markup .= '</div>'; |
70 | 70 | |
| 71 | $resend_confirmation_markup = '<span>'; |
| 72 | $resend_confirmation_markup .= sprintf( |
| 73 | '<a href="%s" class="resend-confirmation" aria-label="%s">%s</a>', |
| 74 | esc_url( |
| 75 | wp_nonce_url( |
| 76 | add_query_arg( |
| 77 | array( |
| 78 | 'action' => 'resend', |
| 79 | 'request_id' => array( $request_id ), |
| 80 | ), |
| 81 | admin_url( 'erase-personal-data.php' ) |
| 82 | ), |
| 83 | 'bulk-privacy_requests' |
| 84 | ) |
| 85 | ), |
| 86 | esc_attr( |
| 87 | sprintf( |
| 88 | /* translators: %s: Request email. */ |
| 89 | __( 'Resend erasure confirmation request to “%s”.' ), |
| 90 | $item->email |
| 91 | ) |
| 92 | ), |
| 93 | __( 'Resend Confirmation Request' ) |
| 94 | ); |
| 95 | $resend_confirmation_markup .= '</span>'; |
| 96 | |
| 97 | $delete_request_markup = '<span class="trash">'; |
| 98 | $delete_request_markup .= sprintf( |
| 99 | '<a href="%s" class="delete-request" aria-label="%s">%s</a>', |
| 100 | esc_url( |
| 101 | wp_nonce_url( |
| 102 | add_query_arg( |
| 103 | array( |
| 104 | 'action' => 'delete', |
| 105 | 'request_id' => array( $request_id ), |
| 106 | ), |
| 107 | admin_url( 'erase-personal-data.php' ) |
| 108 | ), |
| 109 | 'bulk-privacy_requests' |
| 110 | ) |
| 111 | ), |
| 112 | esc_attr( |
| 113 | sprintf( |
| 114 | /* translators: %s: Request email. */ |
| 115 | __( 'Delete “%s” erasure request.' ), |
| 116 | $item->email |
| 117 | ) |
| 118 | ), |
| 119 | __( 'Delete Request' ) |
| 120 | ); |
| 121 | $delete_request_markup .= '</span>'; |
| 122 | |
71 | 123 | $row_actions = array( |
72 | | 'remove-data' => $remove_data_markup, |
| 124 | 'remove-data' => $remove_data_markup, |
| 125 | 'resend-confirmation' => $resend_confirmation_markup, |
| 126 | 'delete-request' => $delete_request_markup, |
73 | 127 | ); |
74 | 128 | } |
75 | 129 | |
diff --git a/src/wp-admin/includes/class-wp-privacy-requests-table.php b/src/wp-admin/includes/class-wp-privacy-requests-table.php
index 744514d840..ef6d2b4045 100644
a
|
b
|
abstract class WP_Privacy_Requests_Table extends WP_List_Table { |
229 | 229 | switch ( $action ) { |
230 | 230 | case 'delete': |
231 | 231 | foreach ( $request_ids as $request_id ) { |
| 232 | $email = get_the_title( $request_id ); |
232 | 233 | if ( wp_delete_post( $request_id, true ) ) { |
233 | 234 | $count ++; |
234 | 235 | } |
235 | 236 | } |
236 | 237 | |
237 | | add_settings_error( |
238 | | 'bulk_action', |
239 | | 'bulk_action', |
240 | | /* translators: %d: Number of requests. */ |
241 | | sprintf( _n( 'Deleted %d request', 'Deleted %d requests', $count ), $count ), |
242 | | 'success' |
243 | | ); |
| 238 | if ( 1 === $count ) { |
| 239 | add_settings_error( |
| 240 | 'bulk_action', |
| 241 | 'bulk_action', |
| 242 | /* translators: %1$s: Request email. */ |
| 243 | sprintf( __( 'Request by %1$s has been deleted.' ), esc_attr( $email ) ), |
| 244 | 'success' |
| 245 | ); |
| 246 | } else { |
| 247 | add_settings_error( |
| 248 | 'bulk_action', |
| 249 | 'bulk_action', |
| 250 | /* translators: %d: Number of requests. */ |
| 251 | sprintf( _n( 'Deleted %d request.', 'Deleted %d requests.', $count ), $count ), |
| 252 | 'success' |
| 253 | ); |
| 254 | } |
244 | 255 | break; |
245 | 256 | case 'resend': |
246 | 257 | foreach ( $request_ids as $request_id ) { |
… |
… |
abstract class WP_Privacy_Requests_Table extends WP_List_Table { |
251 | 262 | } |
252 | 263 | } |
253 | 264 | |
254 | | add_settings_error( |
255 | | 'bulk_action', |
256 | | 'bulk_action', |
257 | | /* translators: %d: Number of requests. */ |
258 | | sprintf( _n( 'Re-sent %d request', 'Re-sent %d requests', $count ), $count ), |
259 | | 'success' |
260 | | ); |
| 265 | if ( 1 === $count ) { |
| 266 | $email = get_the_title( $request_id ); |
| 267 | add_settings_error( |
| 268 | 'bulk_action', |
| 269 | 'bulk_action', |
| 270 | /* translators: %1$s: Request email. */ |
| 271 | sprintf( __( 'Request confirmation has been re-sent to %1$s.' ), esc_attr( $email ) ), |
| 272 | 'success' |
| 273 | ); |
| 274 | } else { |
| 275 | add_settings_error( |
| 276 | 'bulk_action', |
| 277 | 'bulk_action', |
| 278 | /* translators: %d: Number of requests. */ |
| 279 | sprintf( _n( 'Re-sent %d request.', 'Re-sent %d requests.', $count ), $count ), |
| 280 | 'success' |
| 281 | ); |
| 282 | } |
| 283 | |
261 | 284 | break; |
262 | 285 | } |
263 | 286 | } |