Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/29/2024 06:50:42 PM (11 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/activity/post-form.php

    r13442 r13822  
    3131        if ( bp_is_group() ) {
    3232            /* translators: 1: group name. 2: member name. */
    33             printf( __( 'What\'s new in %1$s, %2$s?', 'buddypress' ), bp_get_group_name(), bp_get_user_firstname( bp_get_loggedin_user_fullname() ) );
     33            printf(
     34                esc_html__( 'What\'s new in %1$s, %2$s?', 'buddypress' ),
     35                esc_html( bp_get_group_name() ),
     36                esc_html( bp_get_user_firstname( bp_get_loggedin_user_fullname() ) )
     37            );
    3438        } else {
    3539            /* translators: %s: member name */
    36             printf( __( "What's new, %s?", 'buddypress' ), bp_get_user_firstname( bp_get_loggedin_user_fullname() ) );
     40            printf(
     41                esc_html__( "What's new, %s?", 'buddypress' ),
     42                esc_html( bp_get_user_firstname( bp_get_loggedin_user_fullname() ) )
     43            );
    3744        }
    3845        ?>
     
    4148    <div id="whats-new-content">
    4249        <div id="whats-new-textarea">
    43             <label for="whats-new" class="bp-screen-reader-text"><?php
    44                 /* translators: accessibility text */
    45                 _e( 'Post what\'s new', 'buddypress' );
    46             ?></label>
     50            <label for="whats-new" class="bp-screen-reader-text">
     51                <?php
     52                    /* translators: accessibility text */
     53                    esc_html_e( 'Post what\'s new', 'buddypress' );
     54                ?>
     55            </label>
    4756            <textarea class="bp-suggestions" name="whats-new" id="whats-new" cols="50" rows="10"
    4857                <?php if ( bp_is_group() ) : ?>data-suggestions-group-id="<?php echo esc_attr( (int) bp_get_current_group_id() ); ?>" <?php endif; ?>
     
    5968                <div id="whats-new-post-in-box">
    6069
    61                     <?php _e( 'Post in', 'buddypress' ); ?>:
     70                    <?php esc_html_e( 'Post in', 'buddypress' ); ?>:
    6271
    63                     <label for="whats-new-post-in" class="bp-screen-reader-text"><?php
    64                         /* translators: accessibility text */
    65                         _e( 'Post in', 'buddypress' );
    66                     ?></label>
     72                    <label for="whats-new-post-in" class="bp-screen-reader-text">
     73                        <?php
     74                            /* translators: accessibility text */
     75                            esc_html_e( 'Post in', 'buddypress' );
     76                        ?>
     77                    </label>
    6778                    <select id="whats-new-post-in" name="whats-new-post-in">
    68                         <option selected="selected" value="0"><?php _e( 'My Profile', 'buddypress' ); ?></option>
     79                        <option selected="selected" value="0"><?php esc_html_e( 'My Profile', 'buddypress' ); ?></option>
    6980
    7081                        <?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100&populate_extras=0&update_meta_cache=0' ) ) :
Note: See TracChangeset for help on using the changeset viewer.