Changeset 4967
- Timestamp:
- 05/28/2013 09:29:14 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/settings.php
r4963 r4967 140 140 // Allow global access (on multisite) 141 141 '_bbp_default_role' => array( 142 'title' => __( 'Default user role', 'bbpress' ),143 'callback' => 'bbp_admin_setting_callback_default_role',144 142 'sanitize_callback' => 'sanitize_text_field', 145 143 'args' => array() … … 548 546 549 547 <label for="_bbp_allow_threaded_replies"> 550 <input name="_bbp_allow_threaded_replies" type="checkbox" id="_bbp_allow_threaded_replies" value="1" <?php checked( '1', bbp_allow_threaded_replies( )); ?> />548 <input name="_bbp_allow_threaded_replies" type="checkbox" id="_bbp_allow_threaded_replies" value="1" <?php checked( '1', bbp_allow_threaded_replies( false ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_threaded_replies' ); ?> /> 551 549 <?php printf( esc_html__( 'Enable threaded (nested) replies %s levels deep', 'bbpress' ), $select ); ?> 552 550 </label> … … 595 593 */ 596 594 function bbp_admin_setting_callback_global_access() { 597 ?> 598 599 <input id="_bbp_allow_global_access" name="_bbp_allow_global_access" type="checkbox" id="_bbp_allow_global_access" value="1" <?php checked( bbp_allow_global_access( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_global_access' ); ?> /> 600 <label for="_bbp_allow_global_access"><?php esc_html_e( 'Automatically assign default role to new, registered users upon visiting the site.', 'bbpress' ); ?></label> 601 602 <?php 603 } 604 605 /** 606 * Output forum role selector (for user edit) 607 * 608 * @since bbPress (r4284) 609 */ 610 function bbp_admin_setting_callback_default_role() { 611 612 $default_role = bbp_get_default_role(); ?> 595 596 // Get the default role once rather than loop repeatedly below 597 $default_role = bbp_get_default_role(); 598 599 // Start the output buffer for the select dropdown 600 ob_start(); ?> 613 601 614 602 <select name="_bbp_default_role" id="_bbp_default_role" <?php bbp_maybe_admin_setting_disabled( '_bbp_default_role' ); ?>> … … 622 610 </select> 623 611 624 <?php 612 <?php $select = ob_get_clean(); ?> 613 614 <label for="_bbp_allow_global_access"> 615 <input id="_bbp_allow_global_access" name="_bbp_allow_global_access" type="checkbox" id="_bbp_allow_global_access" value="1" <?php checked( bbp_allow_global_access( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_global_access' ); ?> /> 616 <?php printf( esc_html__( 'Automatically give registered visitors the %s forum role', 'bbpress' ), $select ); ?> 617 </label> 618 619 <?php 625 620 } 626 621
Note: See TracChangeset
for help on using the changeset viewer.