Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/27/2024 05:51:41 PM (2 years ago)
Author:
imath
Message:

Activity component: improve PHP code standards using WPCS

See #7228 (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-notifications.php

    r13503 r13816  
    393393                $reply = 'yes';
    394394        }
    395 
    396395        ?>
    397396
     
    400399                        <tr>
    401400                                <th class="icon">&nbsp;</th>
    402                                 <th class="title"><?php _e( 'Activity', 'buddypress' ) ?></th>
    403                                 <th class="yes"><?php _e( 'Yes', 'buddypress' ) ?></th>
    404                                 <th class="no"><?php _e( 'No', 'buddypress' )?></th>
     401                                <th class="title"><?php esc_html_e( 'Activity', 'buddypress' ) ?></th>
     402                                <th class="yes"><?php esc_html_e( 'Yes', 'buddypress' ) ?></th>
     403                                <th class="no"><?php esc_html_e( 'No', 'buddypress' )?></th>
    405404                        </tr>
    406405                </thead>
     
    413412                                                <?php
    414413                                                /* translators: %s: the displayed user username */
    415                                                 printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_members_get_user_slug( bp_displayed_user_id() ) );
     414                                                printf( esc_html__( 'A member mentions you in an update using "@%s"', 'buddypress' ), esc_html( bp_members_get_user_slug( bp_displayed_user_id() ) ) );
    416415                                                ?>
    417416                                        </td>
    418                                         <td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" id="notification-activity-new-mention-yes" value="yes" <?php checked( $mention, 'yes', true ) ?>/><label for="notification-activity-new-mention-yes" class="bp-screen-reader-text"><?php
    419                                                 /* translators: accessibility text */
    420                                                 esc_html_e( 'Yes, send email', 'buddypress' );
    421                                         ?></label></td>
    422                                         <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" id="notification-activity-new-mention-no" value="no" <?php checked( $mention, 'no', true ) ?>/><label for="notification-activity-new-mention-no" class="bp-screen-reader-text"><?php
    423                                                 /* translators: accessibility text */
    424                                                 esc_html_e( 'No, do not send email', 'buddypress' );
    425                                         ?></label></td>
     417                                        <td class="yes">
     418                                                <input type="radio" name="notifications[notification_activity_new_mention]" id="notification-activity-new-mention-yes" value="yes" <?php checked( $mention, 'yes', true ) ?>/>
     419                                                <label for="notification-activity-new-mention-yes" class="bp-screen-reader-text">
     420                                                        <?php
     421                                                                /* translators: accessibility text */
     422                                                                esc_html_e( 'Yes, send email', 'buddypress' );
     423                                                        ?>
     424                                                </label>
     425                                        </td>
     426                                        <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" id="notification-activity-new-mention-no" value="no" <?php checked( $mention, 'no', true ) ?>/>
     427                                                <label for="notification-activity-new-mention-no" class="bp-screen-reader-text">
     428                                                        <?php
     429                                                                /* translators: accessibility text */
     430                                                                esc_html_e( 'No, do not send email', 'buddypress' );
     431                                                        ?>
     432                                                </label>
     433                                        </td>
    426434                                </tr>
    427435                        <?php endif; ?>
     
    429437                        <tr id="activity-notification-settings-replies">
    430438                                <td>&nbsp;</td>
    431                                 <td><?php _e( "A member replies to an update or comment you've posted", 'buddypress' ) ?></td>
    432                                 <td class="yes"><input type="radio" name="notifications[notification_activity_new_reply]" id="notification-activity-new-reply-yes" value="yes" <?php checked( $reply, 'yes', true ) ?>/><label for="notification-activity-new-reply-yes" class="bp-screen-reader-text"><?php
    433                                         /* translators: accessibility text */
    434                                         esc_html_e( 'Yes, send email', 'buddypress' );
    435                                 ?></label></td>
    436                                 <td class="no"><input type="radio" name="notifications[notification_activity_new_reply]" id="notification-activity-new-reply-no" value="no" <?php checked( $reply, 'no', true ) ?>/><label for="notification-activity-new-reply-no" class="bp-screen-reader-text"><?php
    437                                         /* translators: accessibility text */
    438                                         esc_html_e( 'No, do not send email', 'buddypress' );
    439                                 ?></label></td>
     439                                <td><?php esc_html_e( "A member replies to an update or comment you've posted", 'buddypress' ) ?></td>
     440                                <td class="yes">
     441                                        <input type="radio" name="notifications[notification_activity_new_reply]" id="notification-activity-new-reply-yes" value="yes" <?php checked( $reply, 'yes', true ) ?>/>
     442                                        <label for="notification-activity-new-reply-yes" class="bp-screen-reader-text">
     443                                                <?php
     444                                                        /* translators: accessibility text */
     445                                                        esc_html_e( 'Yes, send email', 'buddypress' );
     446                                                ?>
     447                                        </label>
     448                                </td>
     449                                <td class="no"><input type="radio" name="notifications[notification_activity_new_reply]" id="notification-activity-new-reply-no" value="no" <?php checked( $reply, 'no', true ) ?>/>
     450                                        <label for="notification-activity-new-reply-no" class="bp-screen-reader-text">
     451                                                <?php
     452                                                        /* translators: accessibility text */
     453                                                        esc_html_e( 'No, do not send email', 'buddypress' );
     454                                                ?>
     455                                        </label>
     456                                </td>
    440457                        </tr>
    441458
Note: See TracChangeset for help on using the changeset viewer.