Skip to:
Content

BuddyPress.org

Changeset 13814


Ignore:
Timestamp:
04/27/2024 09:56:51 AM (22 months ago)
Author:
imath
Message:

Settings component: improve PHP code standards using WPCS

See #7228 (trunk)

Location:
trunk/src/bp-settings
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-settings/bp-settings-functions.php

    r13473 r13814  
    361361         * @param string $exporter      Internal exporter name.
    362362         */
    363         $item = apply_filters( 'bp_settings_data_exporter_name', esc_html( $friendly_name ), $exporter );
     363        $item = apply_filters( 'bp_settings_data_exporter_name', $friendly_name, $exporter );
    364364    ?>
    365365
    366         <li><?php echo $item; ?></li>
     366        <li><?php echo esc_html( $item ); ?></li>
    367367
    368368    <?php endforeach; ?>
  • trunk/src/bp-settings/bp-settings-template.php

    r13587 r13814  
    1717 */
    1818function bp_settings_slug() {
    19     echo bp_get_settings_slug();
     19    echo esc_url( bp_get_settings_slug() );
    2020}
    2121
     
    4545 */
    4646function bp_settings_root_slug() {
    47     echo bp_get_settings_root_slug();
     47    echo esc_url( bp_get_settings_root_slug() );
    4848}
    4949
     
    100100            printf(
    101101                /* translators: %s: new email address */
    102                 __( 'There is a pending change of your email address to %s.', 'buddypress' ),
     102                esc_html__( 'There is a pending change of your email address to %s.', 'buddypress' ),
    103103                '<code>' . esc_html( $pending_email['newemail'] ) . '</code>'
    104104            );
     
    108108            printf(
    109109                /* translators: 1: email address. 2: cancel email change url. */
    110                 __( 'Check your email (%1$s) for the verification link, or <a href="%2$s">cancel the pending change</a>.', 'buddypress' ),
     110                esc_html__( 'Check your email (%1$s) for the verification link, or %2$s.', 'buddypress' ),
    111111                '<code>' . esc_html( $pending_email['newemail'] ) . '</code>',
    112                 esc_url( $dismiss_url )
     112                '<a href="' . esc_url( $dismiss_url ) . '">' . esc_html__( 'cancel the pending change', 'buddypress' ) . '</a>'
    113113            );
    114114            ?>
Note: See TracChangeset for help on using the changeset viewer.