Ticket #8913: 8913.6.patch
| File 8913.6.patch, 9.1 KB (added by , 2 years ago) |
|---|
-
bp-xprofile-activity.php
273 273 function xprofile_activity_filter_options() { 274 274 ?> 275 275 276 <option value="updated_profile"><?php _e( 'Profile Updates', 'buddypress' ) ?></option>276 <option value="updated_profile"><?php esc_html_e( 'Profile Updates', 'buddypress' ) ?></option> 277 277 278 278 <?php 279 279 } -
bp-xprofile-admin.php
150 150 ) ); ?> 151 151 152 152 <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> 154 154 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> 156 156 157 157 <hr class="wp-header-end"> 158 158 … … 185 185 ?> 186 186 187 187 <?php if ( ! $group->can_delete ) : ?> 188 <?php _e( '(Primary)', 'buddypress'); ?>188 <?php esc_html_e( '(Primary)', 'buddypress'); ?> 189 189 <?php endif; ?> 190 190 191 191 </a> … … 234 234 <div id="tabs-<?php echo esc_attr( $group->id ); ?>" class="tab-wrapper"> 235 235 <div class="tab-toolbar"> 236 236 <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> 239 239 240 240 <?php if ( $group->can_delete ) : ?> 241 241 242 242 <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> 244 244 </div> 245 245 246 246 <?php endif; ?> … … 299 299 300 300 else : // !$group->fields ?> 301 301 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> 303 303 304 304 <?php endif; // End $group->fields. ?> 305 305 … … 309 309 310 310 <?php endforeach; else : ?> 311 311 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> 314 314 315 315 <?php endif; ?> 316 316 -
classes/class-bp-xprofile-field-type-checkbox-acceptance.php
86 86 */ 87 87 public function edit_field_html( array $raw_properties = array() ) { 88 88 $user_id = bp_displayed_user_id(); 89 $required = false;90 89 $default_r = array(); 91 90 92 91 if ( isset( $raw_properties['user_id'] ) ) { … … 96 95 97 96 if ( bp_get_the_profile_field_is_required() ) { 98 97 $default_r['required'] = 'required'; // HTML5 required attribute. 99 $required = true;100 98 } 101 99 102 100 $r = bp_parse_args( … … 179 177 return; 180 178 } 181 179 182 $class = $current_field->type != $type ? 'display: none;' : '';180 $class = $current_field->type !== $type ? 'display: none;' : ''; 183 181 $page_id = bp_xprofile_get_meta( $current_field->id, 'field', 'bp_xprofile_checkbox_acceptance_page', true ); 184 182 ?> 185 183 -
classes/class-bp-xprofile-field-type-radiobutton.php
90 90 $js_clear = sprintf( 'javascript:%1$s( \'%2$s\' );', $clear, esc_js( bp_get_the_profile_field_input_name() ) ); 91 91 ?> 92 92 93 <a class="clear-value" href="<?php echo $js_clear; ?>">93 <a class="clear-value" href="<?php echo esc_url( $js_clear ); ?>"> 94 94 <?php esc_html_e( 'Clear', 'buddypress' ); ?> 95 95 </a> 96 96 … … 124 124 125 125 // Check for updated posted values, but errors preventing them from 126 126 // 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 ] ) { 128 128 if ( ! empty( $_POST[ 'field_' . $this->field_obj->id ] ) ) { 129 129 $option_value = sanitize_text_field( $_POST[ 'field_' . $this->field_obj->id ] ); 130 130 } -
classes/class-bp-xprofile-field-type.php
430 430 <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 ) ); ?>" /> 431 431 <label for="<?php echo esc_attr( "{$type}_option{$default_name}" ); ?>"> 432 432 <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' ); ?> 434 434 </label> 435 435 436 436 <?php if ( 1 !== $j ) : ?> -
classes/class-bp-xprofile-field.php
1573 1573 ?> 1574 1574 1575 1575 <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> 1577 1577 <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> 1579 1579 1580 1580 <ul> 1581 1581 <?php foreach ( $member_types as $member_type ) : ?> … … 1590 1590 <li> 1591 1591 <label for="member-type-none"> 1592 1592 <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' ); ?> 1594 1594 </label> 1595 1595 </li> 1596 1596 1597 1597 </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> 1599 1599 </div> 1600 1600 1601 1601 <input type="hidden" name="has-member-types" value="1" /> -
classes/class-bp-xprofile-user-admin.php
342 342 343 343 <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>"> 344 344 <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> 346 346 347 347 <?php bp_profile_visibility_radio_buttons(); ?> 348 348