<!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>[7218] sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main: Main: Add two new page templates for Data Export and Data Erasure requests.</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="http://meta.trac.wordpress.org/changeset/7218">7218</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/7218","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>dd32</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2018-05-23 09:27:18 +0000 (Wed, 23 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'>Main: Add two new page templates for Data Export and Data Erasure requests.
These pages and forms are currently disabled for non-privledged accounts and not available.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmainfunctionsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmainheaderchildpagephp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/header-child-page.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmainincprivacyfunctionsphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/privacy-functions.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmainincrecaptchaphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/recaptcha.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmainpageaboutprivacydataerasurerequestphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-privacy-data-erasure-request.php</a></li>
<li><a href="#sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmainpageaboutprivacydataexportrequestphp">sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-privacy-data-export-request.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmainfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php      2018-05-22 22:57:38 UTC (rev 7217)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php        2018-05-23 09:27:18 UTC (rev 7218)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -196,3 +196,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * Custom meta descriptions for page templates.
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> require_once get_stylesheet_directory() . '/inc/page-meta-descriptions.php';
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+/**
+ * Include reCAPTCHA functions for privacy requests.
+ */
+include __DIR__ . '/inc/recaptcha.php';
+
+/**
+ * Include the Privacy request functions.
+ */
+include __DIR__ . '/inc/privacy-functions.php';
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmainheaderchildpagephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/header-child-page.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/header-child-page.php      2018-05-22 22:57:38 UTC (rev 7217)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/header-child-page.php        2018-05-23 09:27:18 UTC (rev 7218)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -28,10 +28,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        <div id="primary-menu" class="menu">
</span><span class="cx" style="display: block; padding: 0 10px">                                                <ul>
</span><span class="cx" style="display: block; padding: 0 10px">                                                        <?php
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                                        $active_item = false;
+                                                       // The last found menu item that patches is the one that's shown as active.
+                                                       foreach ( $menu_items as $path => $text ) {
+                                                               if ( false !== strpos( $_SERVER['REQUEST_URI'], $path ) ) {
+                                                                       $active_item = $path;
+                                                               }
+                                                       }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                                                         foreach ( $menu_items as $path => $text ) :
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                                $class = false !== strpos( $_SERVER['REQUEST_URI'], $path ) ? 'active' : ''; // phpcs:ignore
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                                         $class = ( $path === $active_item ) ? 'active' : ''; // phpcs:ignore
</ins><span class="cx" style="display: block; padding: 0 10px">                                                                 ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                                <li class="page_item"><a class="<?php echo esc_attr( $class ); ?>" href="<?php echo esc_url( home_url( $path ) ); ?>"><?php echo esc_html( $text ); ?></a></li>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                                         <li class="page_item"><a class="<?php echo esc_attr( $class ); ?>" href="<?php echo esc_url( trailingslashit( home_url( $path ) ) ); ?>"><?php echo esc_html( $text ); ?></a></li>
</ins><span class="cx" style="display: block; padding: 0 10px">                                                         <?php endforeach; ?>
</span><span class="cx" style="display: block; padding: 0 10px">                                                </ul>
</span><span class="cx" style="display: block; padding: 0 10px">                                        </div>
</span></span></pre></div>
<a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmainincprivacyfunctionsphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/privacy-functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/privacy-functions.php                          (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/privacy-functions.php    2018-05-23 09:27:18 UTC (rev 7218)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,90 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Functions for the Privacy Tools - Exports and Erasures.
+ */
+namespace WordPressdotorg\MainTheme;
+use WordPressdotorg\GDPR\Main as GDPR_Main;
+
+function privacy_process_request( $type ) {
+       $email = $error_message = $success = false;
+       $nonce_action = 'request_' . $type;
+
+       if ( empty( $_POST['email'] ) || ! $type || ! in_array( $type, [ 'erase', 'export' ] ) ) {
+               return compact( 'email', 'error_message', 'success', 'nonce_action' );
+       }
+
+       $email = trim( wp_unslash( $_POST['email'] ) );
+
+       $requesting_user = false;
+       if ( is_user_logged_in() ) {
+               $requesting_user = wp_get_current_user()->user_login;
+       }
+
+       // Currently only enabled for special accounts.
+       if ( ! is_user_logged_in() || ! wporg_user_has_restricted_password() ) {
+               $api_request = new \WP_Error(
+                       'not_available',
+                       'This form is currently disabled.'
+               );
+       } else
+       if ( ! reCAPTCHA\check_status() ) {
+               $error_message = 'Your form session has expired. Please try again.';
+       } elseif (
+               is_user_logged_in() &&
+               ! wp_verify_nonce( $_POST['_wpnonce'], $nonce_action )
+       ) {
+               $error_message = 'Your form session has expired. Please try again.';
+
+       } elseif (
+               // Check if a user account exists for this email before processing.
+               false != ( $email_user = get_user_by( 'email', $email ) ) &&
+               $email_user->user_login !== $requesting_user
+       ) {
+               if ( is_user_logged_in() ) {
+                       $error_message = sprintf(
+                               'The provided email address belongs to a different WordPress.org account. Please <a href="%1$s">log out</a> and <a href="%2$s">login to the account first</a>.',
+                               wp_logout_url( get_permalink() ),
+                               wp_login_url( get_permalink() )
+                       );
+               } else {
+                       $error_message = sprintf(
+                               'The provided email address belongs to a WordPress.org account. Please <a href="%s">login to the account first</a>.',
+                               wp_login_url( get_permalink() )
+                       );
+               }
+
+       } else {
+               if ( 'export' == $type ) {
+                       $api_method = 'create-data-export-request';
+               } elseif ( 'erase' == $type ) {
+                       $api_method = 'create-account-erasure-request';
+               }
+
+               $api_request = GDPR_Main::instance()->call_api_for_site(
+                       'wordpress.org/',
+                       [
+                               'email'           => $email,
+                               'requesting_user' => $requesting_user,
+                       ],
+                       $api_method,
+                       'POST'
+               );
+
+               if ( is_wp_error( $api_request ) ) {
+                       $error_message = $api_request->get_error_message();
+
+                       if ( 'duplicate_request' == $api_request->get_error_code() ) {
+                               // TODO This should never have to be displayed to an end user. See API for details.
+                               $error_message = 'A request for this email address already exists. Please check your spam folder for your confirmation email.';
+
+                       } elseif ( 'invalid_identifier' == $api_request->get_error_code() ) {
+                               $error_message = 'The provided email was invalid. Please check the address and try again.';
+
+                       }
+               } elseif ( !empty( $api_request['created'] ) ) {
+                       $success = true;
+               }
+       }
+
+       return compact( 'email', 'error_message', 'success', 'nonce_action' );
+}
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/privacy-functions.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmainincrecaptchaphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/recaptcha.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/recaptcha.php                          (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/recaptcha.php    2018-05-23 09:27:18 UTC (rev 7218)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,52 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Functions for reCAPTCHA.
+ */
+namespace WordPressdotorg\MainTheme\reCAPTCHA;
+
+function enqueue_script( $form_id ) {
+       if ( ! defined( 'RECAPTCHA_INVIS_PUBKEY' ) ) {
+               return;
+       }
+
+       wp_enqueue_script( 'recaptcha-api', 'https://www.google.com/recaptcha/api.js', array(), '2' );
+       wp_add_inline_script( 'recaptcha-api', 'function reCAPTCHAPostSubmit(token) { document.getElementById(' . json_encode( (string)$form_id ) . ').submit(); }' );
+}
+
+function display_submit_button( $submit_text = 'Submit', $classes = 'button' ) {
+       echo '<input' .
+               ' data-sitekey=' . esc_attr( RECAPTCHA_INVIS_PUBKEY ) . '"' .
+               ' data-callback="reCAPTCHAPostSubmit"' .
+               ' type="submit"' .
+               ' name="form-submit" id="form-submit"' .
+               ' class="g-recaptcha ' . esc_attr( $classes ) . '"' .
+               ' value="' . esc_attr( $submit_text ) . '"' .
+               '/>';
+}
+
+function check_status() {
+       // If reCAPTCHA is not setup, skip it.
+       if ( ! defined( 'RECAPTCHA_INVIS_PUBKEY' ) ) {
+               return true;
+       }
+
+       if ( empty( $_POST['g-recaptcha-response'] ) ) {
+               return false;
+       }
+
+       $verify = array(
+               'secret'   => RECAPTCHA_INVIS_PRIVKEY,
+               'remoteip' => $_SERVER['REMOTE_ADDR'],
+               'response' => $_POST['g-recaptcha-response'],
+       );
+
+       $resp = wp_remote_post( 'https://www.google.com/recaptcha/api/siteverify', array( 'body' => $verify ) );
+
+       if ( is_wp_error( $resp ) || 200 != wp_remote_retrieve_response_code( $resp ) ) {
+               return false;
+       }
+
+       $result = json_decode( wp_remote_retrieve_body( $resp ), true );
+
+       return (bool) $result['success'];
+}
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/recaptcha.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmainpageaboutprivacydataerasurerequestphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-privacy-data-erasure-request.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-privacy-data-erasure-request.php                                (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-privacy-data-erasure-request.php  2018-05-23 09:27:18 UTC (rev 7218)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,128 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Template Name: About -> Privacy -> Data Erasure Request
+ *
+ * Page template for displaying the Data Erase Request page.
+ *
+ * @package WordPressdotorg\MainTheme
+ */
+
+namespace WordPressdotorg\MainTheme;
+
+$GLOBALS['menu_items'] = [
+       'about/privacy'                      => _x( 'Privacy Policy',       'Page title', 'wporg' ),
+       'about/privacy/data-export-request'  => _x( 'Data Export Request',  'Page title', 'wporg' ),
+       'about/privacy/data-erasure-request' => _x( 'Data Erasure Request', 'Page title', 'wporg' ),
+];
+
+// Prevent Jetpack from looking for a non-existent featured image.
+add_filter( 'jetpack_images_pre_get_images', function() {
+       return new \WP_Error();
+} );
+
+// Pretend we're a direct child of the About page for styling purposes.
+add_filter( 'body_class', function( $classes ) {
+       $classes[] = 'page-parent-about';
+
+       return $classes;
+} );
+
+nocache_headers();
+
+reCAPTCHA\enqueue_script( 'erase-request-form' );
+
+$result = privacy_process_request( 'erase' );
+
+$email         = $result['email'];
+$error_message = $result['error_message'];
+$success       = $result['success'];
+$nonce_action  = $result['nonce_action'];
+
+if ( ! $email && is_user_logged_in() ) {
+       $email = wp_get_current_user()->user_email;
+}
+
+// TODO See inc/page-meta-descriptions.php for the meta description for this page.
+
+add_action( 'wp_head', function() {
+       // TODO: Move to Theme once styled.
+       echo '<style>
+               p.error {
+                       border: 1px solid red;
+                       border-left: 4px solid red;
+                       padding: 6px;
+               }
+               p.success {
+                       border: 1px solid green;
+                       border-left: 4px solid green;
+                       padding: 6px;
+               }
+               form.request-form input[type="email"] {
+                       width: 75%;
+               }
+       </style>';
+} );
+
+get_header( 'child-page' );
+the_post();
+?>
+       <main id="main" class="site-main col-12" role="main">
+
+               <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+                       <header class="entry-header">
+                               <h1 class="entry-title col-8"><?php the_title(); ?></h1>
+                       </header><!-- .entry-header -->
+
+                       <div class="entry-content row">
+                               <section class="col-8">
+                                       <p><em>This page is under active development and is not currently enabled. All text is not final and will change.</em></p>
+
+                                       <p>WordPress.org respects your privacy and allows you to erase all data stored about you.<br>The following form will allow you to request an erasure of any data linked to your email address.</p>
+
+                                       <p>This will request an erasure of all data storred on WordPress.org, WordPress.net, WordCamp.org, BuddyPress.org, bbPress.org, and other related domains and subdomains thereof.</p>
+
+                                       <p>Not all data can be erased, please review the <a href="/about/privacy/">Privacy Policy</a> for details.</p>
+
+                                       <?php if ( $error_message ) : ?>
+                                               <p class="error"><strong>An error occured with your request:</strong> <?php echo $error_message; ?></p>
+                                       <?php elseif ( $success ) : ?>
+                                               <p class="success"><strong>Please check your email for a confirmation link.</strong></p>
+                                       <?php endif; ?>
+
+                                       <p class="error">
+                                               <strong>This is currently disabled unless you have a 'special' WordPress.org account.</strong>
+                                               <br>
+                                               <span style="color: red">DO NOT REQUEST ERASURE UNLESS YOU WANT YOUR ACCOUNT DELETED.</span>
+                                               </strong>
+                                       </p>
+                                       <?php if ( is_user_logged_in() && wporg_user_has_restricted_password() ) : ?>
+                                               <p class="success">PS: You have a special account.</p>
+                                       <?php endif; ?>
+
+                                       <form id="erase-request-form" class="request-form" method="POST" action="#">
+                                               <label for="email">
+                                                       Email Address
+                                               </label>
+                                               <input
+                                                       type="email"
+                                                       name="email" id="email"
+                                                       placeholder="you@example.com"
+                                                       required
+                                                       value="<?php echo esc_attr( $email ); ?>"
+                                               >
+                                               <br>
+                                               <?php reCAPTCHA\display_submit_button( 'Request Erasure' ); ?>
+                                               <?php if ( is_user_logged_in() ) wp_nonce_field( $nonce_action ); ?>
+                                       </form>
+
+                                       <p><strong>Please note:</strong> Before we can begin processing your request, we'll require that you verify ownership of the email address. If the email address is associated with an account, we'll also require you to login to that account first.</p>
+
+                               </section>
+                       </div><!-- .entry-content -->
+
+               </article><!-- #post-## -->
+
+       </main><!-- #main -->
+
+<?php
+get_footer();
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-privacy-data-erasure-request.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="sitestrunkwordpressorgpublic_htmlwpcontentthemespubwporgmainpageaboutprivacydataexportrequestphp"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-privacy-data-export-request.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-privacy-data-export-request.php                         (rev 0)
+++ sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-privacy-data-export-request.php   2018-05-23 09:27:18 UTC (rev 7218)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,121 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+/**
+ * Template Name: About -> Privacy -> Data Export Request
+ *
+ * Page template for displaying the Data Export Request page.
+ *
+ * @package WordPressdotorg\MainTheme
+ */
+
+namespace WordPressdotorg\MainTheme;
+
+$GLOBALS['menu_items'] = [
+       'about/privacy'                      => _x( 'Privacy Policy',       'Page title', 'wporg' ),
+       'about/privacy/data-export-request'  => _x( 'Data Export Request',  'Page title', 'wporg' ),
+       'about/privacy/data-erasure-request' => _x( 'Data Erasure Request', 'Page title', 'wporg' ),
+];
+
+// Prevent Jetpack from looking for a non-existent featured image.
+add_filter( 'jetpack_images_pre_get_images', function() {
+       return new \WP_Error();
+} );
+
+// Pretend we're a direct child of the About page for styling purposes.
+add_filter( 'body_class', function( $classes ) {
+       $classes[] = 'page-parent-about';
+
+       return $classes;
+} );
+
+nocache_headers();
+
+reCAPTCHA\enqueue_script( 'export-request-form' );
+
+$result = privacy_process_request( 'export' );
+
+$email         = $result['email'];
+$error_message = $result['error_message'];
+$success       = $result['success'];
+$nonce_action  = $result['nonce_action'];
+
+if ( ! $email && is_user_logged_in() ) {
+       $email = wp_get_current_user()->user_email;
+}
+
+// TODO See inc/page-meta-descriptions.php for the meta description for this page.
+
+add_action( 'wp_head', function() {
+       // TODO: Move to Theme once styled.
+       echo '<style>
+               p.error {
+                       border: 1px solid red;
+                       border-left: 4px solid red;
+                       padding: 6px;
+               }
+               p.success {
+                       border: 1px solid green;
+                       border-left: 4px solid green;
+                       padding: 6px;
+               }
+               form.request-form input[type="email"] {
+                       width: 75%;
+               }
+       </style>';
+} );
+
+get_header( 'child-page' );
+the_post();
+?>
+       <main id="main" class="site-main col-12" role="main">
+
+               <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+                       <header class="entry-header">
+                               <h1 class="entry-title col-8"><?php the_title(); ?></h1>
+                       </header><!-- .entry-header -->
+
+                       <div class="entry-content row">
+                               <section class="col-8">
+                                       <p><em>This page is under active development and is not currently enabled. All text is not final and will change.</em></p>
+
+                                       <p>WordPress.org respects your privacy and allows you to export all data stored about you.<br>The following form will allow you to request an export of any data linked to your email address.</p>
+
+                                       <p>This export will contain all data storred on WordPress.org, WordPress.net, WordCamp.org, BuddyPress.org, bbPress.org, and other related domains and subdomains thereof.</p>
+
+                                       <?php if ( $error_message ) : ?>
+                                               <p class="error"><strong>An error occured with your request:</strong> <?php echo $error_message; ?></p>
+                                       <?php elseif ( $success ) : ?>
+                                               <p class="success"><strong>Please check your email for a confirmation link.</strong></p>
+                                       <?php endif; ?>
+
+                                       <p class="error"><strong>This is currently disabled unless you have a 'special' WordPress.org account.</strong></p>
+                                       <?php if ( is_user_logged_in() && wporg_user_has_restricted_password() ) : ?>
+                                               <p class="success">PS: You have a special account.</p>
+                                       <?php endif; ?>
+
+                                       <form id="export-request-form" class="request-form" method="POST" action="#">
+                                               <label for="email">
+                                                       Email Address
+                                               </label>
+                                               <input
+                                                       type="email"
+                                                       name="email" id="email"
+                                                       placeholder="you@example.com"
+                                                       required
+                                                       value="<?php echo esc_attr( $email ); ?>"
+                                               >
+                                               <br>
+                                               <?php reCAPTCHA\display_submit_button( 'Request Export' ); ?>
+                                               <?php if ( is_user_logged_in() ) wp_nonce_field( $nonce_action ); ?>
+                                       </form>
+
+                                       <p><strong>Please note:</strong> Before we can begin processing your request, we'll require that you verify ownership of the email address. If the email address is associated with an account, we'll also require you to login to that account first.</p>
+
+                               </section>
+                       </div><!-- .entry-content -->
+
+               </article><!-- #post-## -->
+
+       </main><!-- #main -->
+
+<?php
+get_footer();
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-privacy-data-export-request.php
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span></div>

</body>
</html>