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/groups/single/admin/group-settings.php

    r13156 r13822  
    1010?>
    1111
    12 <h2 class="bp-screen-reader-text"><?php _e( 'Manage Group Settings', 'buddypress' ); ?></h2>
     12<h2 class="bp-screen-reader-text"><?php esc_html_e( 'Manage Group Settings', 'buddypress' ); ?></h2>
    1313
    1414<?php
     
    2323<fieldset class="group-create-privacy">
    2424
    25     <legend><?php _e( 'Privacy Options', 'buddypress' ); ?></legend>
     25    <legend><?php esc_html_e( 'Privacy Options', 'buddypress' ); ?></legend>
    2626
    2727    <div class="radio">
    2828
    29         <label for="group-status-public"><input type="radio" name="group-status" id="group-status-public" value="public"<?php if ( 'public' == bp_get_new_group_status() || !bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="public-group-description" /> <?php _e( 'This is a public group', 'buddypress' ); ?></label>
     29        <label for="group-status-public"><input type="radio" name="group-status" id="group-status-public" value="public"<?php if ( 'public' == bp_get_new_group_status() || ! bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="public-group-description" /> <?php esc_html_e( 'This is a public group', 'buddypress' ); ?></label>
    3030
    3131        <ul id="public-group-description">
    32             <li><?php _e( 'Any site member can join this group.', 'buddypress' ); ?></li>
    33             <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
    34             <li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ); ?></li>
     32            <li><?php esc_html_e( 'Any site member can join this group.', 'buddypress' ); ?></li>
     33            <li><?php esc_html_e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
     34            <li><?php esc_html_e( 'Group content and activity will be visible to any site member.', 'buddypress' ); ?></li>
    3535        </ul>
    3636
    37         <label for="group-status-private"><input type="radio" name="group-status" id="group-status-private" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="private-group-description" /> <?php _e( 'This is a private group', 'buddypress' ); ?></label>
     37        <label for="group-status-private"><input type="radio" name="group-status" id="group-status-private" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="private-group-description" /> <?php esc_html_e( 'This is a private group', 'buddypress' ); ?></label>
    3838
    3939        <ul id="private-group-description">
    40             <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ); ?></li>
    41             <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
    42             <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
     40            <li><?php esc_html_e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ); ?></li>
     41            <li><?php esc_html_e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
     42            <li><?php esc_html_e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
    4343        </ul>
    4444
    45         <label for="group-status-hidden"><input type="radio" name="group-status" id="group-status-hidden" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="hidden-group-description" /> <?php _e('This is a hidden group', 'buddypress' ); ?></label>
     45        <label for="group-status-hidden"><input type="radio" name="group-status" id="group-status-hidden" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="hidden-group-description" /> <?php esc_html_e('This is a hidden group', 'buddypress' ); ?></label>
    4646
    4747        <ul id="hidden-group-description">
    48             <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li>
    49             <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li>
    50             <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
     48            <li><?php esc_html_e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li>
     49            <li><?php esc_html_e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li>
     50            <li><?php esc_html_e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
    5151        </ul>
    5252
     
    5959
    6060    <fieldset class="group-create-types">
    61         <legend><?php _e( 'Group Types', 'buddypress' ); ?></legend>
     61        <legend><?php esc_html_e( 'Group Types', 'buddypress' ); ?></legend>
    6262
    63         <p><?php _e( 'Select the types this group should be a part of.', 'buddypress' ); ?></p>
     63        <p><?php esc_html_e( 'Select the types this group should be a part of.', 'buddypress' ); ?></p>
    6464
    6565        <?php foreach ( $group_types as $type ) : ?>
    6666            <div class="checkbox">
    67                 <label for="<?php printf( 'group-type-%s', $type->name ); ?>">
    68                     <input type="checkbox" name="group-types[]" id="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php checked( bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ); ?>/> <?php echo esc_html( $type->labels['name'] ); ?>
     67                <label for="<?php printf( 'group-type-%s', esc_attr( $type->name ) ); ?>">
     68                    <input type="checkbox" name="group-types[]" id="<?php printf( 'group-type-%s', esc_attr( $type->name ) ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php checked( bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ); ?>/> <?php echo esc_html( $type->labels['name'] ); ?>
    6969                    <?php
    7070                        if ( ! empty( $type->description ) ) {
    71                             printf( __( '&ndash; %s', 'buddypress' ), '<span class="bp-group-type-desc">' . esc_html( $type->description ) . '</span>' );
     71                            printf( esc_html__( '&ndash; %s', 'buddypress' ), '<span class="bp-group-type-desc">' . esc_html( $type->description ) . '</span>' );
    7272                        }
    7373                    ?>
     
    8686    <fieldset class="group-create-invitations">
    8787
    88         <legend><?php _e( 'Group Invitations', 'buddypress' ); ?></legend>
     88        <legend><?php esc_html_e( 'Group Invitations', 'buddypress' ); ?></legend>
    8989
    90         <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
     90        <p><?php esc_html_e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
    9191
    9292        <div class="radio">
    9393
    94             <label for="group-invite-status-members"><input type="radio" name="group-invite-status" id="group-invite-status-members" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> /> <?php _e( 'All group members', 'buddypress' ); ?></label>
     94            <label for="group-invite-status-members"><input type="radio" name="group-invite-status" id="group-invite-status-members" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> /> <?php esc_html_e( 'All group members', 'buddypress' ); ?></label>
    9595
    96             <label for="group-invite-status-mods"><input type="radio" name="group-invite-status" id="group-invite-status-mods" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> /> <?php _e( 'Group admins and mods only', 'buddypress' ); ?></label>
     96            <label for="group-invite-status-mods"><input type="radio" name="group-invite-status" id="group-invite-status-mods" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> /> <?php esc_html_e( 'Group admins and mods only', 'buddypress' ); ?></label>
    9797
    98             <label for="group-invite-status-admins"><input type="radio" name="group-invite-status" id="group-invite-status-admins" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> /> <?php _e( 'Group admins only', 'buddypress' ); ?></label>
     98            <label for="group-invite-status-admins"><input type="radio" name="group-invite-status" id="group-invite-status-admins" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> /> <?php esc_html_e( 'Group admins only', 'buddypress' ); ?></label>
    9999
    100100        </div>
Note: See TracChangeset for help on using the changeset viewer.