Skip to:
Content

BuddyPress.org


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

xProfile: Add label for multiselectbox field in wp-admin.

See #6655.

File:
1 edited

Legend:

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

    r10179 r10298  
    181181                $r = bp_parse_args( $raw_properties, array(
    182182                        'multiple' => 'multiple'
    183                 ) ); ?>
    184 
    185                 <select <?php echo $this->get_edit_field_html_elements( $r ); ?>>
    186                         <?php bp_the_profile_field_options(); ?>
    187                 </select>
     183                ) );
     184
     185                if ( is_admin() ) : ?>
     186
     187                        <label for="<?php bp_the_profile_field_input_name(); ?>" class="screen-reader-text"><?php esc_html_e( 'Select', 'buddypress' ); ?></label>
     188                        <select <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     189                                <?php bp_the_profile_field_options(); ?>
     190                        </select>
     191
     192                <?php else : ?>
     193
     194                        <select <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     195                                <?php bp_the_profile_field_options(); ?>
     196                        </select>
     197
     198                <?php endif; ?>
    188199
    189200                <?php
Note: See TracChangeset for help on using the changeset viewer.