<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[43212] trunk/src: Privacy: cleanup of the "Export Personal Data" and "Erase Personal Data" screens.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/43212">43212</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/43212","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>azaozz</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2018-05-10 10:00:19 +0000 (Thu, 10 May 2018)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Privacy: cleanup of the "Export Personal Data" and "Erase Personal Data" screens.
Props desrosj, xkon.
See <a href="https://core.trac.wordpress.org/ticket/43929">#43929</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincssformscss">trunk/src/wp-admin/css/forms.css</a></li>
<li><a href="#trunksrcwpadminincludesuserphp">trunk/src/wp-admin/includes/user.php</a></li>
<li><a href="#trunksrcwpadminjsxfnjs">trunk/src/wp-admin/js/xfn.js</a></li>
<li><a href="#trunksrcwpincludesuserphp">trunk/src/wp-includes/user.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincssformscss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/css/forms.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/forms.css 2018-05-10 04:59:48 UTC (rev 43211)
+++ trunk/src/wp-admin/css/forms.css 2018-05-10 10:00:19 UTC (rev 43212)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1132,6 +1132,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> border-left-color: #d64d21;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.privacy_requests .request-results .notice {
+ margin: -2px 0 0;
+}
+
+.privacy_requests .request-results .notice p {
+ margin: 0.5em 0;
+}
+
+.request-results td {
+ padding: 0 0 1px;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .status-label {
</span><span class="cx" style="display: block; padding: 0 10px"> font-weight: 600;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadminincludesuserphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/user.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/user.php 2018-05-10 04:59:48 UTC (rev 43211)
+++ trunk/src/wp-admin/includes/user.php 2018-05-10 10:00:19 UTC (rev 43212)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -663,7 +663,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'updated'
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $_POST['action'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $action = isset( $_POST['action'] ) ? sanitize_key( wp_unslash( $_POST['action'] ) ) : ''; // WPCS: input var ok, CSRF ok.
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -760,7 +759,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => -1,
</span><span class="cx" style="display: block; padding: 0 10px"> 'post_status' => 'request-pending',
</span><span class="cx" style="display: block; padding: 0 10px"> 'fields' => 'ids',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'date_query' => array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'date_query' => array(
</ins><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'column' => 'post_modified_gmt',
</span><span class="cx" style="display: block; padding: 0 10px"> 'before' => $expires . ' seconds ago',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1112,7 +1111,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected function get_views() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $current_status = isset( $_REQUEST['filter-status'] ) ? sanitize_text_field( $_REQUEST['filter-status'] ): '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $current_status = isset( $_REQUEST['filter-status'] ) ? sanitize_text_field( $_REQUEST['filter-status'] ) : '';
</ins><span class="cx" style="display: block; padding: 0 10px"> $statuses = _wp_privacy_statuses();
</span><span class="cx" style="display: block; padding: 0 10px"> $views = array();
</span><span class="cx" style="display: block; padding: 0 10px"> $admin_url = admin_url( 'tools.php?page=' . $this->request_type );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1151,7 +1150,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function process_bulk_action() {
</span><span class="cx" style="display: block; padding: 0 10px"> $action = $this->current_action();
</span><span class="cx" style="display: block; padding: 0 10px"> $request_ids = isset( $_REQUEST['request_id'] ) ? wp_parse_id_list( wp_unslash( $_REQUEST['request_id'] ) ) : array(); // WPCS: input var ok, CSRF ok.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $count = 0;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $count = 0;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $request_ids ) {
</span><span class="cx" style="display: block; padding: 0 10px"> check_admin_referer( 'bulk-privacy_requests' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1168,6 +1167,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_settings_error(
</span><span class="cx" style="display: block; padding: 0 10px"> 'bulk_action',
</span><span class="cx" style="display: block; padding: 0 10px"> 'bulk_action',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /* translators: %d: number of requests */
</ins><span class="cx" style="display: block; padding: 0 10px"> sprintf( _n( 'Deleted %d request', 'Deleted %d requests', $count ), $count ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'updated'
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1184,6 +1184,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> add_settings_error(
</span><span class="cx" style="display: block; padding: 0 10px"> 'bulk_action',
</span><span class="cx" style="display: block; padding: 0 10px"> 'bulk_action',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /* translators: %d: number of requests */
</ins><span class="cx" style="display: block; padding: 0 10px"> sprintf( _n( 'Re-sent %d request', 'Re-sent %d requests', $count ), $count ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'updated'
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1213,7 +1214,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'post_type' => $this->post_type,
</span><span class="cx" style="display: block; padding: 0 10px"> 'post_name__in' => array( $this->request_type ),
</span><span class="cx" style="display: block; padding: 0 10px"> 'posts_per_page' => $posts_per_page,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'offset' => isset( $_REQUEST['paged'] ) ? max( 0, absint( $_REQUEST['paged'] ) - 1 ) * $posts_per_page: 0,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'offset' => isset( $_REQUEST['paged'] ) ? max( 0, absint( $_REQUEST['paged'] ) - 1 ) * $posts_per_page : 0,
</ins><span class="cx" style="display: block; padding: 0 10px"> 'post_status' => 'any',
</span><span class="cx" style="display: block; padding: 0 10px"> 's' => isset( $_REQUEST['s'] ) ? sanitize_text_field( $_REQUEST['s'] ) : '',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1305,6 +1306,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $time_diff = current_time( 'timestamp', true ) - $timestamp;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $time_diff >= 0 && $time_diff < DAY_IN_SECONDS ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /* translators: human readable timestamp */
</ins><span class="cx" style="display: block; padding: 0 10px"> return sprintf( __( '%s ago' ), human_time_diff( $timestamp ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1412,21 +1414,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request_id = $item->ID;
</span><span class="cx" style="display: block; padding: 0 10px"> $nonce = wp_create_nonce( 'wp-privacy-export-personal-data-' . $request_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $download_data_markup = '<div class="export_personal_data" ' .
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $download_data_markup = '<div class="export-personal-data" ' .
</ins><span class="cx" style="display: block; padding: 0 10px"> 'data-exporters-count="' . esc_attr( $exporters_count ) . '" ' .
</span><span class="cx" style="display: block; padding: 0 10px"> 'data-request-id="' . esc_attr( $request_id ) . '" ' .
</span><span class="cx" style="display: block; padding: 0 10px"> 'data-nonce="' . esc_attr( $nonce ) .
</span><span class="cx" style="display: block; padding: 0 10px"> '">';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $download_data_markup .= '<span class="export_personal_data_idle"><a href="#" >' . __( 'Download Personal Data' ) . '</a></span>' .
- '<span style="display:none" class="export_personal_data_processing" >' . __( 'Downloading Data...' ) . '</span>' .
- '<span style="display:none" class="export_personal_data_success"><a href="#" >' . __( 'Download Personal Data Again' ) . '</a></span>' .
- '<span style="display:none" class="export_personal_data_failed">' . __( 'Download has failed.' ) . ' <a href="#" >' . __( 'Retry' ) . '</a></span>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $download_data_markup .= '<span class="export-personal-data-idle"><button type="button" class="button-link export-personal-data-handle">' . __( 'Download Personal Data' ) . '</button></span>' .
+ '<span style="display:none" class="export-personal-data-processing" >' . __( 'Downloading Data...' ) . '</span>' .
+ '<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>' .
+ '<span style="display:none" class="export-personal-data-failed">' . __( 'Download has failed.' ) . ' <button type="button" class="button-link">' . __( 'Retry' ) . '</button></span>';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $download_data_markup .= '</div>';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $row_actions = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'download_data' => $download_data_markup,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'download-data' => $download_data_markup,
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return sprintf( '<a href="%1$s">%2$s</a> %3$s', esc_url( 'mailto:' . $item->email ), $item->email, $this->row_actions( $row_actions ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1452,7 +1454,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request_id = $item->ID;
</span><span class="cx" style="display: block; padding: 0 10px"> $nonce = wp_create_nonce( 'wp-privacy-export-personal-data-' . $request_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<div class="export_personal_data" ' .
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div class="export-personal-data" ' .
</ins><span class="cx" style="display: block; padding: 0 10px"> 'data-send-as-email="1" ' .
</span><span class="cx" style="display: block; padding: 0 10px"> 'data-exporters-count="' . esc_attr( $exporters_count ) . '" ' .
</span><span class="cx" style="display: block; padding: 0 10px"> 'data-request-id="' . esc_attr( $request_id ) . '" ' .
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1460,10 +1462,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> '">';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <span class="export_personal_data_idle"><a class="button" href="#" ><?php _e( 'Send Export Link' ); ?></a></span>
- <span style="display:none" class="export_personal_data_processing button updating-message" ><?php _e( 'Sending Email...' ); ?></span>
- <span style="display:none" class="export_personal_data_success success-message" ><?php _e( 'Email sent.' ); ?></span>
- <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>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <span class="export-personal-data-idle"><button type="button" class="button export-personal-data-handle"><?php _e( 'Email Data' ); ?></button></span>
+ <span style="display:none" class="export-personal-data-processing button updating-message" ><?php _e( 'Sending Email...' ); ?></span>
+ <span style="display:none" class="export-personal-data-success success-message" ><?php _e( 'Email sent.' ); ?></span>
+ <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>
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> echo '</div>';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1473,9 +1475,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'request-completed':
</span><span class="cx" style="display: block; padding: 0 10px"> echo '<a href="' . esc_url( wp_nonce_url( add_query_arg( array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'action' => 'delete',
- 'request_id' => array( $item->ID )
- ), admin_url( 'tools.php?page=export_personal_data' ) ), 'bulk-privacy_requests' ) ) . '">' . esc_html__( 'Remove request' ) . '</a>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'action' => 'delete',
+ 'request_id' => array( $item->ID ),
+ ), admin_url( 'tools.php?page=export_personal_data' ) ), 'bulk-privacy_requests' ) ) . '" class="button">' . esc_html__( 'Remove request' ) . '</a>';
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1524,20 +1526,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request_id = $item->ID;
</span><span class="cx" style="display: block; padding: 0 10px"> $nonce = wp_create_nonce( 'wp-privacy-erase-personal-data-' . $request_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $remove_data_markup = '<div class="remove_personal_data force_remove_personal_data" ' .
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $remove_data_markup = '<div class="remove-personal-data force-remove-personal-data" ' .
</ins><span class="cx" style="display: block; padding: 0 10px"> 'data-erasers-count="' . esc_attr( $erasers_count ) . '" ' .
</span><span class="cx" style="display: block; padding: 0 10px"> 'data-request-id="' . esc_attr( $request_id ) . '" ' .
</span><span class="cx" style="display: block; padding: 0 10px"> 'data-nonce="' . esc_attr( $nonce ) .
</span><span class="cx" style="display: block; padding: 0 10px"> '">';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $remove_data_markup .= '<span class="remove_personal_data_idle"><a href="#" >' . __( 'Force Erase Personal Data' ) . '</a></span>' .
- '<span style="display:none" class="remove_personal_data_processing" >' . __( 'Erasing Data...' ) . '</span>' .
- '<span style="display:none" class="remove_personal_data_failed">' . __( 'Force Erase has failed.' ) . ' <a href="#" >' . __( 'Retry' ) . '</a></span>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $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>' .
+ '<span style="display:none" class="remove-personal-data-processing" >' . __( 'Erasing Data...' ) . '</span>' .
+ '<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>';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $remove_data_markup .= '</div>';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $row_actions = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'remove_data' => $remove_data_markup,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'remove-data' => $remove_data_markup,
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1564,7 +1566,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request_id = $item->ID;
</span><span class="cx" style="display: block; padding: 0 10px"> $nonce = wp_create_nonce( 'wp-privacy-erase-personal-data-' . $request_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- echo '<div class="remove_personal_data" ' .
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<div class="remove-personal-data" ' .
</ins><span class="cx" style="display: block; padding: 0 10px"> 'data-force-erase="1" ' .
</span><span class="cx" style="display: block; padding: 0 10px"> 'data-erasers-count="' . esc_attr( $erasers_count ) . '" ' .
</span><span class="cx" style="display: block; padding: 0 10px"> 'data-request-id="' . esc_attr( $request_id ) . '" ' .
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1572,9 +1574,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> '">';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <span class="remove_personal_data_idle"><a class="button" href="#" ><?php _e( 'Erase Personal Data' ); ?></a></span>
- <span style="display:none" class="remove_personal_data_processing button updating-message" ><?php _e( 'Erasing Data...' ); ?></span>
- <span style="display:none" class="remove_personal_data_failed"><?php _e( 'Erasing Data has failed.' ); ?> <a class="button" href="#" ><?php _e( 'Retry' ); ?></a></span>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <span class="remove-personal-data-idle"><button type="button" class="button remove-personal-data-handle"><?php _e( 'Erase Personal Data' ); ?></button></span>
+ <span style="display:none" class="remove-personal-data-processing button updating-message" ><?php _e( 'Erasing Data...' ); ?></span>
+ <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>
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> echo '</div>';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1585,9 +1587,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'request-completed':
</span><span class="cx" style="display: block; padding: 0 10px"> echo '<a href="' . esc_url( wp_nonce_url( add_query_arg( array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'action' => 'delete',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'action' => 'delete',
</ins><span class="cx" style="display: block; padding: 0 10px"> 'request_id' => array( $item->ID ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ), admin_url( 'tools.php?page=remove_personal_data' ) ), 'bulk-privacy_requests' ) ) . '">' . esc_html__( 'Remove request' ) . '</a>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ), admin_url( 'tools.php?page=remove_personal_data' ) ), 'bulk-privacy_requests' ) ) . '" class="button">' . esc_html__( 'Remove request' ) . '</a>';
</ins><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadminjsxfnjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/js/xfn.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/xfn.js 2018-05-10 04:59:48 UTC (rev 43211)
+++ trunk/src/wp-admin/js/xfn.js 2018-05-10 10:00:19 UTC (rev 43212)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,7 +25,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> jQuery( document ).ready( function( $ ) {
</span><span class="cx" style="display: block; padding: 0 10px"> var strings = window.privacyToolsL10n || {};
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function set_action_state( $action, state ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function setActionState( $action, state ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $action.children().hide();
</span><span class="cx" style="display: block; padding: 0 10px"> $action.children( '.' + state ).show();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -37,13 +37,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function appendResultsAfterRow( $requestRow, classes, summaryMessage, additionalMessages ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var itemList = '';
+
</ins><span class="cx" style="display: block; padding: 0 10px"> clearResultsAfterRow( $requestRow );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var itemList = '';
</del><span class="cx" style="display: block; padding: 0 10px"> if ( additionalMessages.length ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $.each( additionalMessages, function( index, value ) {
</span><span class="cx" style="display: block; padding: 0 10px"> itemList = itemList + '<li>' + value + '</li>';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ });
</ins><span class="cx" style="display: block; padding: 0 10px"> itemList = '<ul>' + itemList + '</ul>';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -55,41 +56,42 @@
</span><span class="cx" style="display: block; padding: 0 10px"> '</div>' +
</span><span class="cx" style="display: block; padding: 0 10px"> '</td>' +
</span><span class="cx" style="display: block; padding: 0 10px"> '</tr>';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ });
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $( '.export_personal_data a' ).click( function( event ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $( '.export-personal-data-handle' ).click( function( event ) {
+
+ var $this = $( this ),
+ $action = $this.parents( '.export-personal-data' ),
+ $requestRow = $this.parents( 'tr' ),
+ requestID = $action.data( 'request-id' ),
+ nonce = $action.data( 'nonce' ),
+ exportersCount = $action.data( 'exporters-count' ),
+ sendAsEmail = $action.data( 'send-as-email' ) ? true : false;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> event.preventDefault();
</span><span class="cx" style="display: block; padding: 0 10px"> event.stopPropagation();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var $this = $( this );
- var $action = $this.parents( '.export_personal_data' );
- var $requestRow = $this.parents( 'tr' );
- var requestID = $action.data( 'request-id' );
- var nonce = $action.data( 'nonce' );
- var exportersCount = $action.data( 'exporters-count' );
- var sendAsEmail = $action.data( 'send-as-email' ) ? true : false;
-
</del><span class="cx" style="display: block; padding: 0 10px"> $action.blur();
</span><span class="cx" style="display: block; padding: 0 10px"> clearResultsAfterRow( $requestRow );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function on_export_done_success( zipUrl ) {
- set_action_state( $action, 'export_personal_data_success' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function onExportDoneSuccess( zipUrl ) {
+ setActionState( $action, 'export-personal-data-success' );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 'undefined' !== typeof zipUrl ) {
</span><span class="cx" style="display: block; padding: 0 10px"> window.location = zipUrl;
</span><span class="cx" style="display: block; padding: 0 10px"> } else if ( ! sendAsEmail ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- on_export_failure( strings.noExportFile );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ onExportFailure( strings.noExportFile );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function on_export_failure( errorMessage ) {
- set_action_state( $action, 'export_personal_data_failed' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function onExportFailure( errorMessage ) {
+ setActionState( $action, 'export-personal-data-failed' );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( errorMessage ) {
</span><span class="cx" style="display: block; padding: 0 10px"> appendResultsAfterRow( $requestRow, 'notice-error', strings.exportError, [ errorMessage ] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function do_next_export( exporterIndex, pageIndex ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function doNextExport( exporterIndex, pageIndex ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $.ajax(
</span><span class="cx" style="display: block; padding: 0 10px"> {
</span><span class="cx" style="display: block; padding: 0 10px"> url: window.ajaxurl,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -104,54 +106,59 @@
</span><span class="cx" style="display: block; padding: 0 10px"> method: 'post'
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> ).done( function( response ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var responseData = response.data;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! response.success ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> // e.g. invalid request ID
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- on_export_failure( response.data );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ onExportFailure( response.data );
</ins><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var responseData = response.data;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! responseData.done ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- setTimeout( do_next_export( exporterIndex, pageIndex + 1 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ setTimeout( doNextExport( exporterIndex, pageIndex + 1 ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( exporterIndex < exportersCount ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- setTimeout( do_next_export( exporterIndex + 1, 1 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ setTimeout( doNextExport( exporterIndex + 1, 1 ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- on_export_done_success( responseData.url );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ onExportDoneSuccess( responseData.url );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } ).fail( function( jqxhr, textStatus, error ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }).fail( function( jqxhr, textStatus, error ) {
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // e.g. Nonce failure
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- on_export_failure( error );
- } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ onExportFailure( error );
+ });
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // And now, let's begin
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- set_action_state( $action, 'export_personal_data_processing' );
- do_next_export( 1, 1 );
- } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ setActionState( $action, 'export-personal-data-processing' );
+ doNextExport( 1, 1 );
+ });
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $( '.remove_personal_data a' ).click( function( event ) {
- event.preventDefault();
- event.stopPropagation();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $( '.remove-personal-data-handle' ).click( function( event ) {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var $this = $( this );
- var $action = $this.parents( '.remove_personal_data' );
- var $requestRow = $this.parents( 'tr' );
- var requestID = $action.data( 'request-id' );
- var nonce = $action.data( 'nonce' );
- var erasersCount = $action.data( 'erasers-count' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var $this = $( this ),
+ $action = $this.parents( '.remove-personal-data' ),
+ $requestRow = $this.parents( 'tr' ),
+ requestID = $action.data( 'request-id' ),
+ nonce = $action.data( 'nonce' ),
+ erasersCount = $action.data( 'erasers-count' ),
+ hasRemoved = false,
+ hasRetained = false,
+ messages = [];
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var hasRemoved = false;
- var hasRetained = false;
- var messages = [];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ event.stopPropagation();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $action.blur();
</span><span class="cx" style="display: block; padding: 0 10px"> clearResultsAfterRow( $requestRow );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function on_erasure_done_success() {
- set_action_state( $action, 'remove_personal_data_idle' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function onErasureDoneSuccess() {
</ins><span class="cx" style="display: block; padding: 0 10px"> var summaryMessage = strings.noDataFound;
</span><span class="cx" style="display: block; padding: 0 10px"> var classes = 'notice-success';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ setActionState( $action, 'remove-personal-data-idle' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( false === hasRemoved ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( false === hasRetained ) {
</span><span class="cx" style="display: block; padding: 0 10px"> summaryMessage = strings.noDataFound;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -170,13 +177,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> appendResultsAfterRow( $requestRow, 'notice-success', summaryMessage, messages );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function on_erasure_failure() {
- set_action_state( $action, 'remove_personal_data_failed' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function onErasureFailure() {
+ setActionState( $action, 'remove-personal-data-failed' );
</ins><span class="cx" style="display: block; padding: 0 10px"> appendResultsAfterRow( $requestRow, 'notice-error', strings.removalError, [] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function do_next_erasure( eraserIndex, pageIndex ) {
- $.ajax( {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ function doNextErasure( eraserIndex, pageIndex ) {
+ $.ajax({
</ins><span class="cx" style="display: block; padding: 0 10px"> url: window.ajaxurl,
</span><span class="cx" style="display: block; padding: 0 10px"> data: {
</span><span class="cx" style="display: block; padding: 0 10px"> action: 'wp-privacy-erase-personal-data',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -186,12 +193,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> security: nonce
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> method: 'post'
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } ).done( function( response ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }).done( function( response ) {
+ var responseData = response.data;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! response.success ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- on_erasure_failure();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ onErasureFailure();
</ins><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var responseData = response.data;
</del><span class="cx" style="display: block; padding: 0 10px"> if ( responseData.items_removed ) {
</span><span class="cx" style="display: block; padding: 0 10px"> hasRemoved = hasRemoved || responseData.items_removed;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -202,27 +210,28 @@
</span><span class="cx" style="display: block; padding: 0 10px"> messages = messages.concat( responseData.messages );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! responseData.done ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- setTimeout( do_next_erasure( eraserIndex, pageIndex + 1 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ setTimeout( doNextErasure( eraserIndex, pageIndex + 1 ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( eraserIndex < erasersCount ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- setTimeout( do_next_erasure( eraserIndex + 1, 1 ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ setTimeout( doNextErasure( eraserIndex + 1, 1 ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- on_erasure_done_success();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ onErasureDoneSuccess();
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } ).fail( function() {
- on_erasure_failure();
- } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }).fail( function() {
+ onErasureFailure();
+ });
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // And now, let's begin
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- set_action_state( $action, 'remove_personal_data_processing' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ setActionState( $action, 'remove-personal-data-processing' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- do_next_erasure( 1, 1 );
- } );
-} );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ doNextErasure( 1, 1 );
+ });
+});
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> ( function( $ ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Privacy policy page, copy button.
</span><span class="cx" style="display: block; padding: 0 10px"> $( document ).on( 'click', function( event ) {
</span><span class="cx" style="display: block; padding: 0 10px"> var $target = $( event.target );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -253,4 +262,4 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-} )( jQuery );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+} ( jQuery ) );
</ins></span></pre></div>
<a id="trunksrcwpincludesuserphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/user.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/user.php 2018-05-10 04:59:48 UTC (rev 43211)
+++ trunk/src/wp-includes/user.php 2018-05-10 10:00:19 UTC (rev 43212)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3078,7 +3078,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $request = wp_get_user_request_data( $request_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $request && in_array( $request->action_name, _wp_privacy_action_request_types(), true ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $message = '<p class="message">' . __( 'Action has been confirmed.' ) . '</p>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $message = '<p class="message">' . __( 'Action has been confirmed.' ) . '</p>';
</ins><span class="cx" style="display: block; padding: 0 10px"> $message .= __( 'The site administrator has been notified and will fulfill your request as soon as possible.' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3111,7 +3111,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $user = get_user_by( 'email', $email_address );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $user_id = $user && ! is_wp_error( $user ) ? $user->ID: 0;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user_id = $user && ! is_wp_error( $user ) ? $user->ID : 0;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Check for duplicates.
</span><span class="cx" style="display: block; padding: 0 10px"> $requests_query = new WP_Query( array(
</span></span></pre>
</div>
</div>
</body>
</html>