Skip to:
Content

bbPress.org

Ticket #2392: 2392.2.diff

File 2392.2.diff, 2.9 KB (added by netweb, 11 years ago)
  • includes/admin/settings.php

     
    516516        // Start the output buffer for the select dropdown
    517517        ob_start(); ?>
    518518
    519         <select name="_bbp_default_role" id="_bbp_default_role" <?php bbp_maybe_admin_setting_disabled( '_bbp_default_role' ); ?>>
     519        </label>
     520        <label for="_bbp_default_role">
     521                <select name="_bbp_default_role" id="_bbp_default_role" <?php bbp_maybe_admin_setting_disabled( '_bbp_default_role' ); ?>>
    520522
    521                 <?php foreach ( bbp_get_dynamic_roles() as $role => $details ) : ?>
     523                        <?php foreach ( bbp_get_dynamic_roles() as $role => $details ) : ?>
    522524
    523                         <option <?php selected( $default_role, $role ); ?> value="<?php echo esc_attr( $role ); ?>"><?php echo translate_user_role( $details['name'] ); ?></option>
     525                                <option <?php selected( $default_role, $role ); ?> value="<?php echo esc_attr( $role ); ?>"><?php echo translate_user_role( $details['name'] ); ?></option>
    524526
    525                 <?php endforeach; ?>
     527                        <?php endforeach; ?>
    526528
    527         </select>
     529                </select>
     530        </label>
    528531
    529532        <?php $select = ob_get_clean(); ?>
    530533
     
    531534        <label for="_bbp_allow_global_access">
    532535                <input name="_bbp_allow_global_access" id="_bbp_allow_global_access" type="checkbox" value="1" <?php checked( bbp_allow_global_access( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_global_access' ); ?> />
    533536                <?php printf( esc_html__( 'Automatically give registered visitors the %s forum role', 'bbpress' ), $select ); ?>
    534         </label>
    535537
    536538<?php
    537539}
     
    635637        // Start an output buffer for the select dropdown
    636638        ob_start(); ?>
    637639
    638         <select name="_bbp_thread_replies_depth" id="_bbp_thread_replies_depth" <?php bbp_maybe_admin_setting_disabled( '_bbp_thread_replies_depth' ); ?>>
    639         <?php for ( $i = 2; $i <= $max_depth; $i++ ) : ?>
     640        </label>
     641        <label for="_bbp_thread_replies_depth">
     642                <select name="_bbp_thread_replies_depth" id="_bbp_thread_replies_depth" <?php bbp_maybe_admin_setting_disabled( '_bbp_thread_replies_depth' ); ?>>
     643                <?php for ( $i = 2; $i <= $max_depth; $i++ ) : ?>
    640644
    641                 <option value="<?php echo esc_attr( $i ); ?>" <?php selected( $i, $current_depth ); ?>><?php echo esc_html( $i ); ?></option>
     645                        <option value="<?php echo esc_attr( $i ); ?>" <?php selected( $i, $current_depth ); ?>><?php echo esc_html( $i ); ?></option>
    642646
    643         <?php endfor; ?>
    644         </select>
     647                <?php endfor; ?>
     648                </select>
     649        </label>
    645650
    646651        <?php $select = ob_get_clean(); ?>
    647652
     
    648653        <label for="_bbp_allow_threaded_replies">
    649654                <input name="_bbp_allow_threaded_replies" id="_bbp_allow_threaded_replies" type="checkbox" value="1" <?php checked( '1', bbp_allow_threaded_replies( false ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_threaded_replies' ); ?> />
    650655                <?php printf( esc_html__( 'Enable threaded (nested) replies %s levels deep', 'bbpress' ), $select ); ?>
    651         </label>
    652656
    653657<?php
    654658}