Making WordPress.org


Ignore:
Timestamp:
06/29/2018 08:57:02 PM (8 years ago)
Author:
obenland
Message:

Main: phpcs updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-about-privacy-data-erasure-request.php

    r7277 r7350  
    1111
    1212$GLOBALS['menu_items'] = [
    13     'about/privacy'                      => _x( 'Privacy Policy',      'Page title', 'wporg' ),
    14     #'about/privacy/data-export-request'  => _x( 'Data Export Request', 'Page title', 'wporg' ),
    15     'about/privacy/data-erasure-request' => _x( 'Data Erasure Request', 'Page title', 'wporg' ),
     13    'about/privacy'                      => esc_html_x( 'Privacy Policy', 'Page title', 'wporg' ),
     14    // 'about/privacy/data-export-request'  => esc_html_x( 'Data Export Request', 'Page title', 'wporg' ),
     15    'about/privacy/data-erasure-request' => esc_html_x( 'Data Erasure Request', 'Page title', 'wporg' ),
    1616];
    1717
     
    4343}
    4444
    45 // See inc/page-meta-descriptions.php for the meta description for this page.
     45/* See inc/page-meta-descriptions.php for the meta description for this page. */
    4646
    4747add_action( 'wp_head', function() {
    4848    // TODO: Move to Theme once styled.
    4949    echo '<style>
    50         p.error {
    51             border: 1px solid red;
    52             border-left: 4px solid red;
    53             padding: 6px;
    54         }
    55         p.success {
    56             border: 1px solid green;
    57             border-left: 4px solid green;
    58             padding: 6px;
    59         }
    60         div.alert {
    61             border: 1px solid red;
    62             border-left: 4px solid red;
    63             padding: 6px;
    64             margin-bottom: 2rem;
    65         }   
    6650        form.request-form label {
    6751            display: block;
     
    9781                    <p><?php esc_html_e( 'The following form will allow you to request deletion of your account and relevant personal and private data. You will be required to authenticate ownership of that address, and may be asked to provide additional identification or information necessary to verify the request.', 'wporg' ); ?></p>
    9882
    99                     <div class="alert">
     83                    <div class="notice notice-info notice-alt">
    10084                        <h5><?php esc_html_e( 'Important!', 'wporg' ); ?></h5>
    10185
    102                         <p><?php printf( wp_kses_post( __( 'This will request permanent deletion of your <strong>WordPress.org</strong> account, and relevant personal or private data stored on <strong>%s</strong>, and other related domains and sites.', 'wporg') ), 'WordPress.org, WordPress.net, WordCamp.org, BuddyPress.org, bbPress.org' ); ?></p>
    103 
     86                        <p>
     87                            <?php
     88                            printf(
     89                                /* translators: List of sites that use WordPress.org account. */
     90                                wp_kses_post( __( 'This will request permanent deletion of your <strong>WordPress.org</strong> account, and relevant personal or private data stored on <strong>%s</strong>, and other related domains and sites.', 'wporg' ) ),
     91                                'WordPress.org, WordPress.net, WordCamp.org, BuddyPress.org, bbPress.org'
     92                            );
     93                            ?>
     94                        </p>
    10495                        <p><?php esc_html_e( 'Please note that we cannot remove or provide access to data stored on WordPress sites hosted or administered by third parties.', 'wporg' ); ?></p>
    105 
    106                         <p><?php
     96                        <p>
     97                            <?php
    10798                            printf(
    10899                                /* translators: link to privacy policy. */
    109                                 wp_kses_post( __('Not all data can be erased, please review the <a href="%s">Privacy Policy</a> for details.', 'wporg' ) ),
    110                                 'https://wordpress.org/about/privacy/'
     100                                wp_kses_post( __( 'Not all data can be erased, please review the <a href="%s">Privacy Policy</a> for details.', 'wporg' ) ),
     101                                esc_url( home_url( '/about/privacy/' ) )
    111102                            );
    112                         ?></p>
     103                            ?>
     104                        </p>
    113105                    </div>
    114106
    115107                    <?php if ( $error_message ) : ?>
    116                         <p class="error">
    117                             <strong><?php esc_html_e( 'An error occurred with your request:', 'wporg' ); ?></strong><br>
    118                             <?php echo $error_message; ?>
    119                         </p>
     108                        <div class="notice notice-error notice-alt">
     109                            <p><?php echo esc_html( $error_message ); ?></p>
     110                        </div>
    120111                    <?php elseif ( $success ) : ?>
    121                         <p class="success"><strong><?php esc_html_e( 'Please check your email for a confirmation link, and follow the instructions to authenticate your request.', 'wporg' ); ?></strong></p>
     112                        <div class="notice notice-success notice-alt">
     113                            <p><?php esc_html_e( 'Please check your email for a confirmation link, and follow the instructions to authenticate your request.', 'wporg' ); ?></p>
     114                        </div>
    122115                    <?php endif; ?>
    123116
    124                     <?php if ( !$success ) : ?>
    125                     <form id="erase-request-form" class="request-form" method="POST" action="#">
    126                         <label for="email">
    127                             <?php esc_html_e( 'Email Address', 'wporg' ); ?>
    128                         </label>
    129                         <input
    130                             type="email"
    131                             name="email" id="email"
    132                             placeholder="<?php
     117                    <?php if ( ! $success ) : ?>
     118                        <form id="erase-request-form" class="request-form" method="POST" action="#">
     119                            <label for="email"><?php esc_html_e( 'Email Address', 'wporg' ); ?></label>
     120                            <?php
     121                            printf( '<input type="email" name="email" id="email" placeholder="%1$s" required value="%2$s" />',
    133122                                /* translators: Example placeholder email address */
    134                                 esc_attr_e( 'you@example.com', 'wporg' )
    135                             ?>"
    136                             required
    137                             value="<?php echo esc_attr( $email ); ?>"
    138                         >
    139                         <p><?php esc_html_e( 'By submitting this form, you declare that you are the individual owner of the specified email address and its associated accounts; and that all submitted information including any supplemental details necessary to verify your identity are true. You also declare that it is your intention for accounts associated with that email address to be permanently deleted.', 'wporg' ); ?></p>
    140                         <?php reCAPTCHA\display_submit_button( __( 'Accept Declaration and Request Permanent Account Deletion', 'wporg' ) ); ?>
    141                         <?php if ( is_user_logged_in() ) wp_nonce_field( $nonce_action ); ?>
    142                     </form>
    143 
     123                                esc_attr__( 'you@example.com', 'wporg' ),
     124                                esc_attr( $email )
     125                            );
     126                            ?>
     127                            <p><?php esc_html_e( 'By submitting this form, you declare that you are the individual owner of the specified email address and its associated accounts; and that all submitted information including any supplemental details necessary to verify your identity are true. You also declare that it is your intention for accounts associated with that email address to be permanently deleted.', 'wporg' ); ?></p>
     128                            <?php
     129                            reCAPTCHA\display_submit_button( __( 'Accept Declaration and Request Permanent Account Deletion', 'wporg' ) );
     130                            if ( is_user_logged_in() ) :
     131                                wp_nonce_field( $nonce_action );
     132                            endif;
     133                            ?>
     134                        </form>
    144135                        <p><?php esc_html_e( 'Please Note: Before we can begin processing your request, we&#8217;ll require that you verify ownership of the email address. If the email address is associated with an account, we&#8217;ll also require you to log in to that account first.', 'wporg' ); ?></p>
    145 
    146136                    <?php endif; ?>
    147137
    148138                </section>
    149139            </div><!-- .entry-content -->
    150 
    151140        </article><!-- #post-## -->
    152141
Note: See TracChangeset for help on using the changeset viewer.