Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/22/2015 09:04:44 AM (8 years ago)
Author:
djpaul
Message:

xProfile: adjust wp-admin field labels

The admin_field_html method is only used inside wp-admin, so there's
no need to wrap these template bits inside is_admin checks.

Partially reverts the changes in r10298:10302. See #6655

File:
1 edited

Legend:

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

    r10300 r10305  
    162162     */
    163163    public function admin_field_html( array $raw_properties = array() ) {
     164        ?>
    164165
    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; ?>
     166        <label for="<?php bp_the_profile_field_input_name(); ?>" class="screen-reader-text"><?php esc_html_e( 'Select', 'buddypress' ); ?></label>
     167        <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?>>
     168            <?php bp_the_profile_field_options(); ?>
     169        </select>
    179170
    180171        <?php
Note: See TracChangeset for help on using the changeset viewer.