Changeset 43212 for trunk/src/wp-admin/includes/user.php
- Timestamp:
- 05/10/2018 10:00:19 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/user.php
r43191 r43212 664 664 ); 665 665 } 666 667 666 } elseif ( isset( $_POST['action'] ) ) { 668 667 $action = isset( $_POST['action'] ) ? sanitize_key( wp_unslash( $_POST['action'] ) ) : ''; // WPCS: input var ok, CSRF ok. … … 761 760 'post_status' => 'request-pending', 762 761 'fields' => 'ids', 763 'date_query' => array(762 'date_query' => array( 764 763 array( 765 764 'column' => 'post_modified_gmt', … … 1113 1112 */ 1114 1113 protected function get_views() { 1115 $current_status = isset( $_REQUEST['filter-status'] ) ? sanitize_text_field( $_REQUEST['filter-status'] ) : '';1114 $current_status = isset( $_REQUEST['filter-status'] ) ? sanitize_text_field( $_REQUEST['filter-status'] ) : ''; 1116 1115 $statuses = _wp_privacy_statuses(); 1117 1116 $views = array(); … … 1152 1151 $action = $this->current_action(); 1153 1152 $request_ids = isset( $_REQUEST['request_id'] ) ? wp_parse_id_list( wp_unslash( $_REQUEST['request_id'] ) ) : array(); // WPCS: input var ok, CSRF ok. 1154 $count = 0;1153 $count = 0; 1155 1154 1156 1155 if ( $request_ids ) { … … 1169 1168 'bulk_action', 1170 1169 'bulk_action', 1170 /* translators: %d: number of requests */ 1171 1171 sprintf( _n( 'Deleted %d request', 'Deleted %d requests', $count ), $count ), 1172 1172 'updated' … … 1185 1185 'bulk_action', 1186 1186 'bulk_action', 1187 /* translators: %d: number of requests */ 1187 1188 sprintf( _n( 'Re-sent %d request', 'Re-sent %d requests', $count ), $count ), 1188 1189 'updated' … … 1214 1215 'post_name__in' => array( $this->request_type ), 1215 1216 'posts_per_page' => $posts_per_page, 1216 'offset' => isset( $_REQUEST['paged'] ) ? max( 0, absint( $_REQUEST['paged'] ) - 1 ) * $posts_per_page : 0,1217 'offset' => isset( $_REQUEST['paged'] ) ? max( 0, absint( $_REQUEST['paged'] ) - 1 ) * $posts_per_page : 0, 1217 1218 'post_status' => 'any', 1218 1219 's' => isset( $_REQUEST['s'] ) ? sanitize_text_field( $_REQUEST['s'] ) : '', … … 1306 1307 1307 1308 if ( $time_diff >= 0 && $time_diff < DAY_IN_SECONDS ) { 1309 /* translators: human readable timestamp */ 1308 1310 return sprintf( __( '%s ago' ), human_time_diff( $timestamp ) ); 1309 1311 } … … 1413 1415 $nonce = wp_create_nonce( 'wp-privacy-export-personal-data-' . $request_id ); 1414 1416 1415 $download_data_markup = '<div class="export _personal_data" ' .1417 $download_data_markup = '<div class="export-personal-data" ' . 1416 1418 'data-exporters-count="' . esc_attr( $exporters_count ) . '" ' . 1417 1419 'data-request-id="' . esc_attr( $request_id ) . '" ' . … … 1419 1421 '">'; 1420 1422 1421 $download_data_markup .= '<span class="export _personal_data_idle"><a href="#" >' . __( 'Download Personal Data' ) . '</a></span>' .1422 '<span style="display:none" class="export _personal_data_processing" >' . __( 'Downloading Data...' ) . '</span>' .1423 '<span style="display:none" class="export _personal_data_success"><a href="#" >' . __( 'Download Personal Data Again' ) . '</a></span>' .1424 '<span style="display:none" class="export _personal_data_failed">' . __( 'Download has failed.' ) . ' <a href="#" >' . __( 'Retry' ) . '</a></span>';1423 $download_data_markup .= '<span class="export-personal-data-idle"><button type="button" class="button-link export-personal-data-handle">' . __( 'Download Personal Data' ) . '</button></span>' . 1424 '<span style="display:none" class="export-personal-data-processing" >' . __( 'Downloading Data...' ) . '</span>' . 1425 '<span style="display:none" class="export-personal-data-success"><button type="button" class="button-link export-personal-data-handle">' . __( 'Download Personal Data Again' ) . '</button></span>' . 1426 '<span style="display:none" class="export-personal-data-failed">' . __( 'Download has failed.' ) . ' <button type="button" class="button-link">' . __( 'Retry' ) . '</button></span>'; 1425 1427 1426 1428 $download_data_markup .= '</div>'; 1427 1429 1428 1430 $row_actions = array( 1429 'download _data' => $download_data_markup,1431 'download-data' => $download_data_markup, 1430 1432 ); 1431 1433 … … 1453 1455 $nonce = wp_create_nonce( 'wp-privacy-export-personal-data-' . $request_id ); 1454 1456 1455 echo '<div class="export _personal_data" ' .1457 echo '<div class="export-personal-data" ' . 1456 1458 'data-send-as-email="1" ' . 1457 1459 'data-exporters-count="' . esc_attr( $exporters_count ) . '" ' . … … 1461 1463 1462 1464 ?> 1463 <span class="export _personal_data_idle"><a class="button" href="#" ><?php _e( 'Send Export Link' ); ?></a></span>1464 <span style="display:none" class="export _personal_data_processing button updating-message" ><?php _e( 'Sending Email...' ); ?></span>1465 <span style="display:none" class="export _personal_data_success success-message" ><?php _e( 'Email sent.' ); ?></span>1466 <span style="display:none" class="export _personal_data_failed"><?php _e( 'Email could not be sent.' ); ?> <a class="button" href="#" ><?php _e( 'Retry' ); ?></a></span>1465 <span class="export-personal-data-idle"><button type="button" class="button export-personal-data-handle"><?php _e( 'Email Data' ); ?></button></span> 1466 <span style="display:none" class="export-personal-data-processing button updating-message" ><?php _e( 'Sending Email...' ); ?></span> 1467 <span style="display:none" class="export-personal-data-success success-message" ><?php _e( 'Email sent.' ); ?></span> 1468 <span style="display:none" class="export-personal-data-failed"><?php _e( 'Email could not be sent.' ); ?> <button type="button" class="button export-personal-data-handle"><?php _e( 'Retry' ); ?></button></span> 1467 1469 <?php 1468 1470 … … 1474 1476 case 'request-completed': 1475 1477 echo '<a href="' . esc_url( wp_nonce_url( add_query_arg( array( 1476 'action' => 'delete',1477 'request_id' => array( $item->ID ) 1478 ), admin_url( 'tools.php?page=export_personal_data' ) ), 'bulk-privacy_requests' ) ) . '" >' . esc_html__( 'Remove request' ) . '</a>';1478 'action' => 'delete', 1479 'request_id' => array( $item->ID ), 1480 ), admin_url( 'tools.php?page=export_personal_data' ) ), 'bulk-privacy_requests' ) ) . '" class="button">' . esc_html__( 'Remove request' ) . '</a>'; 1479 1481 break; 1480 1482 } … … 1525 1527 $nonce = wp_create_nonce( 'wp-privacy-erase-personal-data-' . $request_id ); 1526 1528 1527 $remove_data_markup = '<div class="remove _personal_data force_remove_personal_data" ' .1529 $remove_data_markup = '<div class="remove-personal-data force-remove-personal-data" ' . 1528 1530 'data-erasers-count="' . esc_attr( $erasers_count ) . '" ' . 1529 1531 'data-request-id="' . esc_attr( $request_id ) . '" ' . … … 1531 1533 '">'; 1532 1534 1533 $remove_data_markup .= '<span class="remove _personal_data_idle"><a href="#" >' . __( 'Force Erase Personal Data' ) . '</a></span>' .1534 '<span style="display:none" class="remove _personal_data_processing" >' . __( 'Erasing Data...' ) . '</span>' .1535 '<span style="display:none" class="remove _personal_data_failed">' . __( 'Force Erase has failed.' ) . ' <a href="#" >' . __( 'Retry' ) . '</a></span>';1535 $remove_data_markup .= '<span class="remove-personal-data-idle"><button type="button" class="button-link remove-personal-data-handle">' . __( 'Force Erase Personal Data' ) . '</button></span>' . 1536 '<span style="display:none" class="remove-personal-data-processing" >' . __( 'Erasing Data...' ) . '</span>' . 1537 '<span style="display:none" class="remove-personal-data-failed">' . __( 'Force Erase has failed.' ) . ' <button type="button" class="button-link remove-personal-data-handle">' . __( 'Retry' ) . '</button></span>'; 1536 1538 1537 1539 $remove_data_markup .= '</div>'; 1538 1540 1539 1541 $row_actions = array( 1540 'remove _data' => $remove_data_markup,1542 'remove-data' => $remove_data_markup, 1541 1543 ); 1542 1544 } … … 1565 1567 $nonce = wp_create_nonce( 'wp-privacy-erase-personal-data-' . $request_id ); 1566 1568 1567 echo '<div class="remove _personal_data" ' .1569 echo '<div class="remove-personal-data" ' . 1568 1570 'data-force-erase="1" ' . 1569 1571 'data-erasers-count="' . esc_attr( $erasers_count ) . '" ' . … … 1573 1575 1574 1576 ?> 1575 <span class="remove _personal_data_idle"><a class="button" href="#" ><?php _e( 'Erase Personal Data' ); ?></a></span>1576 <span style="display:none" class="remove _personal_data_processing button updating-message" ><?php _e( 'Erasing Data...' ); ?></span>1577 <span style="display:none" class="remove _personal_data_failed"><?php _e( 'Erasing Data has failed.' ); ?> <a class="button" href="#" ><?php _e( 'Retry' ); ?></a></span>1577 <span class="remove-personal-data-idle"><button type="button" class="button remove-personal-data-handle"><?php _e( 'Erase Personal Data' ); ?></button></span> 1578 <span style="display:none" class="remove-personal-data-processing button updating-message" ><?php _e( 'Erasing Data...' ); ?></span> 1579 <span style="display:none" class="remove-personal-data-failed"><?php _e( 'Erasing Data has failed.' ); ?> <button type="button" class="button remove-personal-data-handle"><?php _e( 'Retry' ); ?></button></span> 1578 1580 <?php 1579 1581 … … 1586 1588 case 'request-completed': 1587 1589 echo '<a href="' . esc_url( wp_nonce_url( add_query_arg( array( 1588 'action' => 'delete',1590 'action' => 'delete', 1589 1591 'request_id' => array( $item->ID ), 1590 ), admin_url( 'tools.php?page=remove_personal_data' ) ), 'bulk-privacy_requests' ) ) . '" >' . esc_html__( 'Remove request' ) . '</a>';1592 ), admin_url( 'tools.php?page=remove_personal_data' ) ), 'bulk-privacy_requests' ) ) . '" class="button">' . esc_html__( 'Remove request' ) . '</a>'; 1591 1593 break; 1592 1594 }
Note: See TracChangeset
for help on using the changeset viewer.