Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/29/2024 06:50:42 PM (2 years 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/change-avatar.php

    r12082 r13822  
    1010?>
    1111
    12 <h2><?php _e( 'Change Profile Photo', 'buddypress' ); ?></h2>
     12<h2><?php esc_html_e( 'Change Profile Photo', 'buddypress' ); ?></h2>
    1313
    1414<?php
     
    2323<?php if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?>
    2424
    25         <p><?php _e( 'Your profile photo will be used on your profile and throughout the site. If there is a <a href="http://gravatar.com">Gravatar</a> associated with your account email we will use that, or you can upload an image from your computer.', 'buddypress' ); ?></p>
     25        <p>
     26                <?php
     27                printf(
     28                        esc_html__( 'Your profile photo will be used on your profile and throughout the site. If there is a %s associated with your account email we will use that, or you can upload an image from your computer.', 'buddypress' ),
     29                        '<a href="http://gravatar.com">Gravatar</a>'
     30                );
     31                ?>
     32        </p>
    2633
    2734        <form action="" method="post" id="avatar-upload-form" class="standard-form" enctype="multipart/form-data">
     
    3037
    3138                        <?php wp_nonce_field( 'bp_avatar_upload' ); ?>
    32                         <p><?php _e( 'Click below to select a JPG, GIF or PNG format photo from your computer and then click \'Upload Image\' to proceed.', 'buddypress' ); ?></p>
     39                        <p><?php esc_html_e( 'Click below to select a JPG, GIF or PNG format photo from your computer and then click \'Upload Image\' to proceed.', 'buddypress' ); ?></p>
    3340
    3441                        <p id="avatar-upload">
    35                                 <label for="file" class="bp-screen-reader-text"><?php
    36                                         /* translators: accessibility text */
    37                                         _e( 'Select an image', 'buddypress' );
    38                                 ?></label>
     42                                <label for="file" class="bp-screen-reader-text">
     43                                        <?php
     44                                                /* translators: accessibility text */
     45                                                esc_html_e( 'Select an image', 'buddypress' );
     46                                        ?>
     47                                </label>
    3948                                <input type="file" name="file" id="file" />
    4049                                <input type="submit" name="upload" id="upload" value="<?php esc_attr_e( 'Upload Image', 'buddypress' ); ?>" />
     
    4352
    4453                        <?php if ( bp_get_user_has_avatar() ) : ?>
    45                                 <p><?php _e( "If you'd like to delete your current profile photo but not upload a new one, please use the delete profile photo button.", 'buddypress' ); ?></p>
    46                                 <p><a class="button edit" href="<?php bp_avatar_delete_link(); ?>"><?php _e( 'Delete My Profile Photo', 'buddypress' ); ?></a></p>
     54                                <p><?php esc_html_e( "If you'd like to delete your current profile photo but not upload a new one, please use the delete profile photo button.", 'buddypress' ); ?></p>
     55                                <p><a class="button edit" href="<?php bp_avatar_delete_link(); ?>"><?php esc_html_e( 'Delete My Profile Photo', 'buddypress' ); ?></a></p>
    4756                        <?php endif; ?>
    4857
     
    5160                <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
    5261
    53                         <h5><?php _e( 'Crop Your New Profile Photo', 'buddypress' ); ?></h5>
     62                        <h5><?php esc_html_e( 'Crop Your New Profile Photo', 'buddypress' ); ?></h5>
    5463
    5564                        <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php esc_attr_e( 'Profile photo to crop', 'buddypress' ); ?>" />
     
    8392<?php else : ?>
    8493
    85         <p><?php _e( 'Your profile photo will be used on your profile and throughout the site. To change your profile photo, please create an account with <a href="https://gravatar.com">Gravatar</a> using the same email address as you used to register with this site.', 'buddypress' ); ?></p>
     94        <p>
     95                <?php
     96                printf(
     97                        esc_html__( 'Your profile photo will be used on your profile and throughout the site. To change your profile photo, please create an account with %s using the same email address as you used to register with this site.', 'buddypress' ),
     98                        '<a href="https://gravatar.com">Gravatar</a>'
     99                );
     100                ?>
     101        </p>
    86102
    87103<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.