Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/25/2024 05:14:05 PM (2 years ago)
Author:
imath
Message:

xProfile component: improve PHP code standards using WPCS

See #7228 (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type.php

    r13399 r13806  
    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_html_e( 'Default Value', 'buddypress' ); ?>
    434434                                                        </label>
    435435
     
    566566                return bp_get_form_field_attributes( sanitize_key( bp_get_the_profile_field_name() ), $r );
    567567        }
     568
     569        /**
     570         * Output a sanitized and escaped string of the edit field's HTML elements and attributes.
     571         *
     572         * @since 12.4.1
     573         *
     574         * @param array $properties Optional key/value array of attributes for this edit field.
     575         */
     576        protected function output_edit_field_html_elements( array $properties = array() ) {
     577                // Escaping is done in `bp_get_form_field_attributes()`.
     578                // phpcs:ignore WordPress.Security.EscapeOutput
     579                echo $this->get_edit_field_html_elements( $properties );
     580        }
    568581}
Note: See TracChangeset for help on using the changeset viewer.