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-export-request.php

    r7225 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 
    6150        form.request-form label {
    6251            display: block;
     
    8877                    <p><?php esc_html_e( 'The following form will allow you to request an export of any data linked to your email address. 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 and search our records.', 'wporg' ); ?></p>
    8978
    90                     <p><?php esc_html_e( 'This export will contain relevant personal or private data stored on WordPress.org, WordPress.net, WordCamp.org, BuddyPress.org, bbPress.org, and other related domains and sites.', 'wporg'); ?></p>
     79                    <p><?php esc_html_e( 'This export will contain relevant personal or private data stored on WordPress.org, WordPress.net, WordCamp.org, BuddyPress.org, bbPress.org, and other related domains and sites.', 'wporg' ); ?></p>
    9180
    9281                    <?php if ( $error_message ) : ?>
    93                         <p class="error">
    94                             <strong><?php esc_html_e( 'An error occured with your request:', 'wporg' ); ?></strong><br>
    95                             <?php echo $error_message; ?>
    96                         </p>
     82                        <div class="notice notice-error notice-alt">
     83                            <p><?php echo esc_html( $error_message ); ?></p>
     84                        </div>
    9785                    <?php elseif ( $success ) : ?>
    98                     <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>
     86                    <div class="notice notice-success notice-alt">
     87                        <p><?php esc_html_e( 'Please check your email for a confirmation link, and follow the instructions to authenticate your request.', 'wporg' ); ?></p>
     88                    </div>
    9989                    <?php endif; ?>
    10090
    101                     <p class="error"><strong>This is currently disabled unless you have a 'special' WordPress.org account.</strong></p>
    102                     <?php if ( is_user_logged_in() && wporg_user_has_restricted_password() ) : ?>
    103                         <p class="success">PS: You have a special account.</p>
     91                    <div class="notice notice-error notice-alt">
     92                        <p>This is currently disabled unless you have a 'special' WordPress.org account.</p>
     93                    </div>
     94                    <?php if ( is_user_logged_in() && function_exists( 'wporg_user_has_restricted_password' ) && wporg_user_has_restricted_password() ) : ?>
     95                        <div class="notice notice-info notice-alt"><p>PS: You have a special account.</p></div>
    10496                    <?php endif; ?>
    10597
    10698                    <form id="export-request-form" class="request-form" method="POST" action="#">
    107                         <label for="email">
    108                             <?php esc_html_e( 'Email Address', 'wporg' ); ?>
    109                         </label>
    110                         <input
    111                             type="email"
    112                             name="email" id="email"
    113                             placeholder="<?php
    114                                 /* translators: Example placeholder email address */
    115                                 esc_attr_e( 'you@example.com', 'wporg' )
    116                             ?>"
    117                             required
    118                             value="<?php echo esc_attr( $email ); ?>"
    119                         >
     99                        <label for="email"><?php esc_html_e( 'Email Address', 'wporg' ); ?></label>
     100                        <?php
     101                        printf( '<input type="email" name="email" id="email" placeholder="%1$s" required value="%2$s" />',
     102                            /* translators: Example placeholder email address */
     103                            esc_attr__( 'you@example.com', 'wporg' ),
     104                            esc_attr( $email )
     105                        );
     106                        ?>
    120107                        <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.', 'wporg' ); ?></p>
    121                         <?php reCAPTCHA\display_submit_button( __( 'Accept Declaration and Request Export', 'wporg' ) ); ?>
    122                         <?php if ( is_user_logged_in() ) wp_nonce_field( $nonce_action ); ?>
     108                        <?php
     109                        reCAPTCHA\display_submit_button( __( 'Accept Declaration and Request Export', 'wporg' ) );
     110                        if ( is_user_logged_in() ) :
     111                            wp_nonce_field( $nonce_action );
     112                        endif;
     113                        ?>
    123114                    </form>
    124 
    125                     <p><?php esc_html_e( "Please Note: 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 log in to that account first.", 'wporg' ); ?></p>
    126 
     115                    <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>
    127116                </section>
    128117            </div><!-- .entry-content -->
    129 
    130118        </article><!-- #post-## -->
    131119
Note: See TracChangeset for help on using the changeset viewer.