Skip to:
Content

BuddyPress.org

Changeset 10299


Ignore:
Timestamp:
10/22/2015 01:41:27 AM (4 years ago)
Author:
mercime
Message:

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

See #6655.

File:
1 edited

Legend:

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

    r10179 r10299  
    9292        $r = bp_parse_args( $raw_properties, array(
    9393            'type' => 'number'
    94         ) ); ?>
     94        ) );
    9595
    96         <input <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     96        if ( is_admin() ) : ?>
     97
     98            <label for="<?php bp_the_profile_field_input_name(); ?>" class="screen-reader-text"><?php esc_html_e( 'Number field', 'buddypress' ); ?></label>
     99            <input <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     100
     101        <?php else : ?>
     102
     103            <input <?php echo $this->get_edit_field_html_elements( $r ); ?>>
     104
     105        <?php endif; ?>
     106
    97107    <?php
    98108    }
Note: See TracChangeset for help on using the changeset viewer.