Skip to:
Content

BuddyPress.org

Ticket #8913: 8913.6.patch

File 8913.6.patch, 9.1 KB (added by viralsampat, 2 years ago)

I have checked above mentioned issue and founds few more files. I have applied its patch.

  • bp-xprofile-activity.php

     
    273273function xprofile_activity_filter_options() {
    274274        ?>
    275275
    276         <option value="updated_profile"><?php _e( 'Profile Updates', 'buddypress' ) ?></option>
     276        <option value="updated_profile"><?php esc_html_e( 'Profile Updates', 'buddypress' ) ?></option>
    277277
    278278        <?php
    279279}
  • bp-xprofile-admin.php

     
    150150        ) ); ?>
    151151
    152152        <div class="wrap">
    153                 <h1 class="wp-heading-inline"><?php _ex( 'Profile Fields', 'Settings page header', 'buddypress'); ?></h1>
     153                <h1 class="wp-heading-inline"><?php esc_html_x( 'Profile Fields', 'Settings page header', 'buddypress'); ?></h1>
    154154
    155                         <a id="add_group" class="page-title-action" href="<?php echo esc_url( $add_group_url ); ?>"><?php _e( 'Add New Field Group', 'buddypress' ); ?></a>
     155                        <a id="add_group" class="page-title-action" href="<?php echo esc_url( $add_group_url ); ?>"><?php esc_html_e( 'Add New Field Group', 'buddypress' ); ?></a>
    156156
    157157                <hr class="wp-header-end">
    158158
     
    185185                                                                ?>
    186186
    187187                                                                <?php if ( ! $group->can_delete ) : ?>
    188                                                                         <?php _e( '(Primary)', 'buddypress'); ?>
     188                                                                        <?php esc_html_e( '(Primary)', 'buddypress'); ?>
    189189                                                                <?php endif; ?>
    190190
    191191                                                        </a>
     
    234234                                        <div id="tabs-<?php echo esc_attr( $group->id ); ?>" class="tab-wrapper">
    235235                                                <div class="tab-toolbar">
    236236                                                        <div class="tab-toolbar-left">
    237                                                                 <a class="button-primary" href="<?php echo esc_url( $add_field_url ); ?>"><?php _e( 'Add New Field', 'buddypress' ); ?></a>
    238                                                                 <a class="button edit" href="<?php echo esc_url( $edit_group_url ); ?>"><?php _ex( 'Edit Group', 'Edit Profile Fields Group', 'buddypress' ); ?></a>
     237                                                                <a class="button-primary" href="<?php echo esc_url( $add_field_url ); ?>"><?php esc_html_e( 'Add New Field', 'buddypress' ); ?></a>
     238                                                                <a class="button edit" href="<?php echo esc_url( $edit_group_url ); ?>"><?php esc_html_x( 'Edit Group', 'Edit Profile Fields Group', 'buddypress' ); ?></a>
    239239
    240240                                                                <?php if ( $group->can_delete ) : ?>
    241241
    242242                                                                        <div class="delete-button">
    243                                                                                 <a class="confirm submitdelete deletion ajax-option-delete" href="<?php echo esc_url( $delete_group_url ); ?>"><?php _ex( 'Delete Group', 'Delete Profile Fields Group', 'buddypress' ); ?></a>
     243                                                                                <a class="confirm submitdelete deletion ajax-option-delete" href="<?php echo esc_url( $delete_group_url ); ?>"><?php esc_html_x( 'Delete Group', 'Delete Profile Fields Group', 'buddypress' ); ?></a>
    244244                                                                        </div>
    245245
    246246                                                                <?php endif; ?>
     
    299299
    300300                                                        else : // !$group->fields ?>
    301301
    302                                                                 <p class="nodrag nofields"><?php _e( 'There are no fields in this group.', 'buddypress' ); ?></p>
     302                                                                <p class="nodrag nofields"><?php esc_html_e( 'There are no fields in this group.', 'buddypress' ); ?></p>
    303303
    304304                                                        <?php endif; // End $group->fields. ?>
    305305
     
    309309
    310310                                <?php endforeach; else : ?>
    311311
    312                                         <div id="message" class="error notice is-dismissible"><p><?php _ex( 'You have no groups.', 'You have no profile fields groups.', 'buddypress' ); ?></p></div>
    313                                         <p><a href="<?php echo esc_url( $add_group_url ); ?>"><?php _ex( 'Add New Group', 'Add New Profile Fields Group', 'buddypress' ); ?></a></p>
     312                                        <div id="message" class="error notice is-dismissible"><p><?php esc_html_x( 'You have no groups.', 'You have no profile fields groups.', 'buddypress' ); ?></p></div>
     313                                        <p><a href="<?php echo esc_url( $add_group_url ); ?>"><?php esc_html_x( 'Add New Group', 'Add New Profile Fields Group', 'buddypress' ); ?></a></p>
    314314
    315315                                <?php endif; ?>
    316316
  • classes/class-bp-xprofile-field-type-checkbox-acceptance.php

     
    8686         */
    8787        public function edit_field_html( array $raw_properties = array() ) {
    8888                $user_id   = bp_displayed_user_id();
    89                 $required  = false;
    9089                $default_r = array();
    9190
    9291                if ( isset( $raw_properties['user_id'] ) ) {
     
    9695
    9796                if ( bp_get_the_profile_field_is_required() ) {
    9897                        $default_r['required'] = 'required'; // HTML5 required attribute.
    99                         $required              = true;
    10098                }
    10199
    102100                $r = bp_parse_args(
     
    179177                        return;
    180178                }
    181179
    182                 $class   = $current_field->type != $type ? 'display: none;' : '';
     180                $class   = $current_field->type !== $type ? 'display: none;' : '';
    183181                $page_id = bp_xprofile_get_meta( $current_field->id, 'field', 'bp_xprofile_checkbox_acceptance_page', true );
    184182                ?>
    185183
  • classes/class-bp-xprofile-field-type-radiobutton.php

     
    9090                                $js_clear = sprintf( 'javascript:%1$s( \'%2$s\' );', $clear, esc_js( bp_get_the_profile_field_input_name() ) );
    9191                        ?>
    9292
    93                                 <a class="clear-value" href="<?php echo $js_clear; ?>">
     93                                <a class="clear-value" href="<?php echo esc_url( $js_clear ); ?>">
    9494                                        <?php esc_html_e( 'Clear', 'buddypress' ); ?>
    9595                                </a>
    9696
     
    124124
    125125                        // Check for updated posted values, but errors preventing them from
    126126                        // being saved first time.
    127                         if ( isset( $_POST[ 'field_' . $this->field_obj->id ] ) && $option_value != $_POST[ 'field_' . $this->field_obj->id ] ) {
     127                        if ( isset( $_POST[ 'field_' . $this->field_obj->id ] ) && $option_value !== $_POST[ 'field_' . $this->field_obj->id ] ) {
    128128                                if ( ! empty( $_POST[ 'field_' . $this->field_obj->id ] ) ) {
    129129                                        $option_value = sanitize_text_field( $_POST[ 'field_' . $this->field_obj->id ] );
    130130                                }
  • classes/class-bp-xprofile-field-type.php

     
    430430                                                        <input type="text" name="<?php echo esc_attr( "{$type}_option[{$j}]" ); ?>" id="<?php echo esc_attr( "{$type}_option{$j}" ); ?>" value="<?php echo esc_attr( stripslashes( $options[ $i ]->name ) ); ?>" />
    431431                                                        <label for="<?php echo esc_attr( "{$type}_option{$default_name}" ); ?>">
    432432                                                                <input type="<?php echo esc_attr( $control_type ); ?>" id="<?php echo esc_attr( "{$type}_option{$default_name}" ); ?>" name="<?php echo esc_attr( "isDefault_{$type}_option{$default_name}" ); ?>" <?php checked( $options[ $i ]->is_default_option, true ); ?> value="<?php echo esc_attr( $j ); ?>" />
    433                                                                 <?php _e( 'Default Value', 'buddypress' ); ?>
     433                                                                <?php esc_attr_e( 'Default Value', 'buddypress' ); ?>
    434434                                                        </label>
    435435
    436436                                                        <?php if ( 1 !== $j ) : ?>
  • classes/class-bp-xprofile-field.php

     
    15731573                ?>
    15741574
    15751575                <div id="field-type-member-types" class="postbox">
    1576                         <h2><?php _e( 'Member Types', 'buddypress' ); ?></h2>
     1576                        <h2><?php esc_attr_e( 'Member Types', 'buddypress' ); ?></h2>
    15771577                        <div class="inside">
    1578                                 <p class="description"><?php _e( 'This field should be available to:', 'buddypress' ); ?></p>
     1578                                <p class="description"><?php esc_attr_e( 'This field should be available to:', 'buddypress' ); ?></p>
    15791579
    15801580                                <ul>
    15811581                                        <?php foreach ( $member_types as $member_type ) : ?>
     
    15901590                                        <li>
    15911591                                                <label for="member-type-none">
    15921592                                                        <input name="member-types[]" id="member-type-none" class="member-type-selector" type="checkbox" value="null" <?php checked( in_array( 'null', $field_member_types ) ); ?>/>
    1593                                                         <?php _e( 'Users with no member type', 'buddypress' ); ?>
     1593                                                        <?php esc_attr_e( 'Users with no member type', 'buddypress' ); ?>
    15941594                                                </label>
    15951595                                        </li>
    15961596
    15971597                                </ul>
    1598                                 <p class="description member-type-none-notice<?php if ( ! empty( $field_member_types ) ) : ?> hide<?php endif; ?>"><?php _e( 'Unavailable to all members.', 'buddypress' ) ?></p>
     1598                                <p class="description member-type-none-notice<?php if ( ! empty( $field_member_types ) ) : ?> hide<?php endif; ?>"><?php esc_attr_e( 'Unavailable to all members.', 'buddypress' ) ?></p>
    15991599                        </div>
    16001600
    16011601                        <input type="hidden" name="has-member-types" value="1" />
  • classes/class-bp-xprofile-user-admin.php

     
    342342
    343343                                                <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
    344344                                                        <fieldset>
    345                                                                 <legend><?php _e( 'Who can see this field?', 'buddypress' ); ?></legend>
     345                                                                <legend><?php esc_html_e( 'Who can see this field?', 'buddypress' ); ?></legend>
    346346
    347347                                                                <?php bp_profile_visibility_radio_buttons(); ?>
    348348