Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/29/2024 06:50:42 PM (20 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/profile/profile-wp.php

    r12082 r13822  
    2727
    2828    <div class="bp-widget wp-profile">
    29         <h2><?php bp_is_my_profile() ? _e( 'My Profile', 'buddypress' ) : printf( __( "%s's Profile", 'buddypress' ), bp_get_displayed_user_fullname() ); ?></h2>
     29        <h2><?php bp_is_my_profile() ? esc_html_e( 'My Profile', 'buddypress' ) : printf( esc_html__( "%s's Profile", 'buddypress' ), esc_html( bp_get_displayed_user_fullname() ) ); ?></h2>
    3030
    3131        <table class="wp-profile-fields">
     
    3434
    3535                <tr id="wp_displayname">
    36                     <td class="label"><?php _e( 'Name', 'buddypress' ); ?></td>
    37                     <td class="data"><?php echo $ud->display_name; ?></td>
     36                    <td class="label"><?php esc_html_e( 'Name', 'buddypress' ); ?></td>
     37                    <td class="data"><?php echo esc_html( $ud->display_name ); ?></td>
    3838                </tr>
    3939
     
    4343
    4444                <tr id="wp_desc">
    45                     <td class="label"><?php _e( 'About Me', 'buddypress' ); ?></td>
    46                     <td class="data"><?php echo $ud->user_description; ?></td>
     45                    <td class="label"><?php esc_html_e( 'About Me', 'buddypress' ); ?></td>
     46                    <td class="data"><?php echo esc_html( $ud->user_description ); ?></td>
    4747                </tr>
    4848
     
    5252
    5353                <tr id="wp_website">
    54                     <td class="label"><?php _e( 'Website', 'buddypress' ); ?></td>
    55                     <td class="data"><?php echo make_clickable( $ud->user_url ); ?></td>
     54                    <td class="label"><?php esc_html_e( 'Website', 'buddypress' ); ?></td>
     55                    <td class="data">
     56                        <?php
     57                        // phpcs:ignore WordPress.Security.EscapeOutput
     58                        echo make_clickable( esc_url( $ud->user_url ) );
     59                        ?>
     60                    </td>
    5661                </tr>
    5762
     
    6166
    6267                <tr id="wp_jabber">
    63                     <td class="label"><?php _e( 'Jabber', 'buddypress' ); ?></td>
    64                     <td class="data"><?php echo $ud->jabber; ?></td>
     68                    <td class="label"><?php esc_html_e( 'Jabber', 'buddypress' ); ?></td>
     69                    <td class="data"><?php echo esc_html( $ud->jabber ); ?></td>
    6570                </tr>
    6671
     
    7075
    7176                <tr id="wp_aim">
    72                     <td class="label"><?php _e( 'AOL Messenger', 'buddypress' ); ?></td>
    73                     <td class="data"><?php echo $ud->aim; ?></td>
     77                    <td class="label"><?php esc_html_e( 'AOL Messenger', 'buddypress' ); ?></td>
     78                    <td class="data"><?php echo esc_html( $ud->aim ); ?></td>
    7479                </tr>
    7580
     
    7984
    8085                <tr id="wp_yim">
    81                     <td class="label"><?php _e( 'Yahoo Messenger', 'buddypress' ); ?></td>
    82                     <td class="data"><?php echo $ud->yim; ?></td>
     86                    <td class="label"><?php esc_html_e( 'Yahoo Messenger', 'buddypress' ); ?></td>
     87                    <td class="data"><?php echo esc_html( $ud->yim ); ?></td>
    8388                </tr>
    8489
Note: See TracChangeset for help on using the changeset viewer.