<!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>[43213] branches/4.9/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/43213">43213</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/43213","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:02:41 +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.
Merges <a href="https://core.trac.wordpress.org/changeset/43212">[43212]</a> to the 4.9 branch.
See <a href="https://core.trac.wordpress.org/ticket/43929">#43929</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branches49srcwpadmincssformscss">branches/4.9/src/wp-admin/css/forms.css</a></li>
<li><a href="#branches49srcwpadminincludesuserphp">branches/4.9/src/wp-admin/includes/user.php</a></li>
<li><a href="#branches49srcwpadminjsxfnjs">branches/4.9/src/wp-admin/js/xfn.js</a></li>
<li><a href="#branches49srcwpincludesuserphp">branches/4.9/src/wp-includes/user.php</a></li>
</ul>

<h3>Property Changed</h3>
<ul>
<li><a href="#branches49">branches/4.9/</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<span class="cx" style="display: block; padding: 0 10px">Index: branches/4.9
</span><span class="cx" style="display: block; padding: 0 10px">===================================================================
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">--- branches/4.9 2018-05-10 10:00:19 UTC (rev 43212)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ branches/4.9  2018-05-10 10:02:41 UTC (rev 43213)
</ins><a id="branches49"></a>
<div class="propset"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Property changes: branches/4.9</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: svn:mergeinfo</h4></div>
<span class="cx" style="display: block; padding: 0 10px"> /branches/3.1:18031
</span><span class="cx" style="display: block; padding: 0 10px"> /branches/3.3:20543
</span><span class="cx" style="display: block; padding: 0 10px"> /branches/3.4:21757
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/trunk:18512,42132,42134,42136,42138,42140,42144,42146,42148,42150,42152-42153,42155,42157,42159,42161,42163,42169,42171,42173,42175,42177,42181,42183,42185,42187,42189,42191,42193,42199,42203,42210,42214,42220,42222,42226,42242,42244,42247,42251,42256-42261,42350,42358,42362,42364-42368,42374,42388,42390,42401,42417,42421,42423-42425,42430,42433,42437,42441,42443,42446-42447,42449,42451,42453,42457,42459,42462,42491,42521,42529,42531,42533,42536,42538,42541,42543,42545,42549,42566,42568,42570,42572,42574,42576,42579,42581-42582,42584-42585,42587-42588,42590,42592,42594-42595,42598-42599,42602,42604,42606,42611-42613,42615,42617,42624-42625,42639,42648,42652-42653,42665,42687,42697,42711,42713,42719,42722,42739-42740,42744,42758,42772,42791-42792,42801,42814-42815,42817-42818,42823,42830,42837,42839,42841,42844,42851-42852,42860,42864,42881,42888-42889,42892-42894,42930,42964,42967,42971
 -42972,42977-42978,42980,42985-42987,42989,42992,42994-42995,42998-42999,43001-43004,43007-43008,43011-43012,43014-43015,43025,43027,43030,43032,43034,43036,43039,43042,43044-43048,43052-43063,43065,43081,43085,43088-43089,43091,43104,43116,43118,43120-43121,43123,43125-43126,43131-43132,43135,43137,43139,43145-43148,43150,43154-43155,43158,43160,43162,43166,43168,43170,43172,43175,43180-43181,43183-43185,43189,43191,43193,43195,43197,43199,43201,43203,43206,43208
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/trunk:18512,42132,42134,42136,42138,42140,42144,42146,42148,42150,42152-42153,42155,42157,42159,42161,42163,42169,42171,42173,42175,42177,42181,42183,42185,42187,42189,42191,42193,42199,42203,42210,42214,42220,42222,42226,42242,42244,42247,42251,42256-42261,42350,42358,42362,42364-42368,42374,42388,42390,42401,42417,42421,42423-42425,42430,42433,42437,42441,42443,42446-42447,42449,42451,42453,42457,42459,42462,42491,42521,42529,42531,42533,42536,42538,42541,42543,42545,42549,42566,42568,42570,42572,42574,42576,42579,42581-42582,42584-42585,42587-42588,42590,42592,42594-42595,42598-42599,42602,42604,42606,42611-42613,42615,42617,42624-42625,42639,42648,42652-42653,42665,42687,42697,42711,42713,42719,42722,42739-42740,42744,42758,42772,42791-42792,42801,42814-42815,42817-42818,42823,42830,42837,42839,42841,42844,42851-42852,42860,42864,42881,42888-42889,42892-42894,42930,42964,42967,42971
 -42972,42977-42978,42980,42985-42987,42989,42992,42994-42995,42998-42999,43001-43004,43007-43008,43011-43012,43014-43015,43025,43027,43030,43032,43034,43036,43039,43042,43044-43048,43052-43063,43065,43081,43085,43088-43089,43091,43104,43116,43118,43120-43121,43123,43125-43126,43131-43132,43135,43137,43139,43145-43148,43150,43154-43155,43158,43160,43162,43166,43168,43170,43172,43175,43180-43181,43183-43185,43189,43191,43193,43195,43197,43199,43201,43203,43206,43208,43212
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="branches49srcwpadmincssformscss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/4.9/src/wp-admin/css/forms.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/4.9/src/wp-admin/css/forms.css   2018-05-10 10:00:19 UTC (rev 43212)
+++ branches/4.9/src/wp-admin/css/forms.css     2018-05-10 10:02:41 UTC (rev 43213)
</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: bold;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="branches49srcwpadminincludesuserphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/4.9/src/wp-admin/includes/user.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/4.9/src/wp-admin/includes/user.php       2018-05-10 10:00:19 UTC (rev 43212)
+++ branches/4.9/src/wp-admin/includes/user.php 2018-05-10 10:02:41 UTC (rev 43213)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -622,7 +622,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">@@ -719,7 +718,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">@@ -1071,7 +1070,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">@@ -1110,7 +1109,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">@@ -1127,6 +1126,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">@@ -1143,6 +1143,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">@@ -1172,7 +1173,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">@@ -1264,6 +1265,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">@@ -1371,21 +1373,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">@@ -1411,7 +1413,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">@@ -1419,10 +1421,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">@@ -1432,9 +1434,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">@@ -1483,20 +1485,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">@@ -1523,7 +1525,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">@@ -1531,9 +1533,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">@@ -1544,9 +1546,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="branches49srcwpadminjsxfnjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/4.9/src/wp-admin/js/xfn.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/4.9/src/wp-admin/js/xfn.js       2018-05-10 10:00:19 UTC (rev 43212)
+++ branches/4.9/src/wp-admin/js/xfn.js 2018-05-10 10:02:41 UTC (rev 43213)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -20,7 +20,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">@@ -32,13 +32,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">@@ -50,41 +51,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">@@ -99,54 +101,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">@@ -165,13 +172,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">@@ -181,12 +188,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">@@ -197,27 +205,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">@@ -248,4 +257,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="branches49srcwpincludesuserphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/4.9/src/wp-includes/user.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/4.9/src/wp-includes/user.php     2018-05-10 10:00:19 UTC (rev 43212)
+++ branches/4.9/src/wp-includes/user.php       2018-05-10 10:02:41 UTC (rev 43213)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2884,7 +2884,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">@@ -2917,7 +2917,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>