Ticket #44266: 44266.2.diff
File 44266.2.diff, 6.7 KB (added by , 5 years ago) |
---|
-
src/wp-admin/css/forms.css
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 } -
src/wp-admin/includes/class-wp-privacy-data-export-requests-list-table.php
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 ) ); -
src/wp-admin/includes/class-wp-privacy-data-removal-requests-list-table.php
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 -
src/wp-admin/includes/class-wp-privacy-requests-table.php
227 227 switch ( $action ) { 228 228 case 'delete': 229 229 foreach ( $request_ids as $request_id ) { 230 $email = get_the_title( $request_id ); 230 231 if ( wp_delete_post( $request_id, true ) ) { 231 232 $count ++; 232 233 } 233 234 } 234 235 235 add_settings_error( 236 'bulk_action', 237 'bulk_action', 238 /* translators: %d: Number of requests. */ 239 sprintf( _n( 'Deleted %d request', 'Deleted %d requests', $count ), $count ), 240 'success' 241 ); 236 if ( 1 === $count ) { 237 add_settings_error( 238 'bulk_action', 239 'bulk_action', 240 /* translators: %1$s: Request email. */ 241 sprintf( __( 'Request by %1$s has been deleted.' ), esc_attr( $email ) ), 242 'success' 243 ); 244 } else { 245 add_settings_error( 246 'bulk_action', 247 'bulk_action', 248 /* translators: %d: Number of requests. */ 249 sprintf( _n( 'Deleted %d request.', 'Deleted %d requests.', $count ), $count ), 250 'success' 251 ); 252 } 242 253 break; 243 254 case 'resend': 244 255 foreach ( $request_ids as $request_id ) { … … 249 260 } 250 261 } 251 262 252 add_settings_error( 253 'bulk_action', 254 'bulk_action', 255 /* translators: %d: Number of requests. */ 256 sprintf( _n( 'Re-sent %d request', 'Re-sent %d requests', $count ), $count ), 257 'success' 258 ); 263 if ( 1 === $count ) { 264 $email = get_the_title( $request_id ); 265 add_settings_error( 266 'bulk_action', 267 'bulk_action', 268 /* translators: %1$s: Request email. */ 269 sprintf( __( 'Request confirmation has been re-sent to %1$s.' ), esc_attr( $email ) ), 270 'success' 271 ); 272 } else { 273 add_settings_error( 274 'bulk_action', 275 'bulk_action', 276 /* translators: %d: Number of requests. */ 277 sprintf( _n( 'Re-sent %d request', 'Re-sent %d requests', $count ), $count ), 278 'success' 279 ); 280 } 281 259 282 break; 260 283 } 261 284 }