Skip to:
Content

BuddyPress.org

Changeset 10300


Ignore:
Timestamp:
10/22/2015 01:42:28 AM (11 years ago)
Author:
mercime
Message:

xProfile: Add label for selectbox fields in wp-admin.

See #6655.

File:
1 edited

Legend:

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

    r10179 r10300  
    162162         */
    163163        public function admin_field_html( array $raw_properties = array() ) {
    164                 ?>
    165164
    166                 <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?>>
    167                         <?php bp_the_profile_field_options(); ?>
    168                 </select>
     165                if ( is_admin() ) : ?>
     166
     167                        <label for="<?php bp_the_profile_field_input_name(); ?>" class="screen-reader-text"><?php esc_html_e( 'Select', 'buddypress' ); ?></label>
     168                        <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?>>
     169                                <?php bp_the_profile_field_options(); ?>
     170                        </select>
     171
     172                <?php else : ?>
     173
     174                        <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?>>
     175                                <?php bp_the_profile_field_options(); ?>
     176                        </select>
     177
     178                <?php endif; ?>
    169179
    170180                <?php
Note: See TracChangeset for help on using the changeset viewer.