Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/29/2024 06:50:42 PM (9 months ago)
Author:
imath
Message:

BP Legacy: improve PHP code standards using WPCS

See #7228 (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/members/single/settings/data.php

    r13472 r13822  
    2525                <?php
    2626                /* translators: %s: expiration date */
    27                 printf( esc_html__( 'You may download your personal data by clicking on the link below. For privacy and security, we will automatically delete the file on %s, so please download it before then.', 'buddypress' ), bp_settings_get_personal_data_expiration_date( $request ) );
     27                printf( esc_html__( 'You may download your personal data by clicking on the link below. For privacy and security, we will automatically delete the file on %s, so please download it before then.', 'buddypress' ), esc_html( bp_settings_get_personal_data_expiration_date( $request ) ) );
    2828                ?>
    2929            </p>
    3030
    31             <p><strong><?php printf( '<a href="%1$s">%2$s</a>', bp_settings_get_personal_data_export_url( $request ), esc_html__( 'Download personal data', 'buddypress' ) ); ?></strong></p>
     31            <p><strong><?php printf( '<a href="%1$s">%2$s</a>', esc_url( bp_settings_get_personal_data_export_url( $request ) ), esc_html__( 'Download personal data', 'buddypress' ) ); ?></strong></p>
    3232
    3333        <?php else : ?>
     
    3737
    3838            <form id="bp-data-export" method="post">
    39                 <input type="hidden" name="bp-data-export-delete-request-nonce" value="<?php echo wp_create_nonce( 'bp-data-export-delete-request' ); ?>" />
    40                 <button type="submit" name="bp-data-export-nonce" value="<?php echo wp_create_nonce( 'bp-data-export' ); ?>"><?php esc_html_e( 'Request new data export', 'buddypress' ); ?></button>
     39                <input type="hidden" name="bp-data-export-delete-request-nonce" value="<?php echo esc_attr( wp_create_nonce( 'bp-data-export-delete-request' ) ); ?>" />
     40                <button type="submit" name="bp-data-export-nonce" value="<?php echo esc_attr( wp_create_nonce( 'bp-data-export' ) ); ?>"><?php esc_html_e( 'Request new data export', 'buddypress' ); ?></button>
    4141            </form>
    4242
     
    4848            <?php
    4949            /* translators: %s: confirmation date */
    50             printf( esc_html__( 'You previously requested an export of your personal data on %s.', 'buddypress' ), bp_settings_get_personal_data_confirmation_date( $request ) );
     50            printf( esc_html__( 'You previously requested an export of your personal data on %s.', 'buddypress' ), esc_html( bp_settings_get_personal_data_confirmation_date( $request ) ) );
    5151            ?>
    5252        </p>
     
    6464
    6565    <form id="bp-data-export" method="post">
    66         <button type="submit" name="bp-data-export-nonce" value="<?php echo wp_create_nonce( 'bp-data-export' ); ?>"><?php esc_html_e( 'Request personal data export', 'buddypress' ); ?></button>
     66        <button type="submit" name="bp-data-export-nonce" value="<?php echo esc_attr( wp_create_nonce( 'bp-data-export' ) ); ?>"><?php esc_html_e( 'Request personal data export', 'buddypress' ); ?></button>
    6767    </form>
    6868
Note: See TracChangeset for help on using the changeset viewer.