Changeset 7089
- Timestamp:
- 05/28/2020 04:31:32 PM (4 years ago)
- Location:
- branches/2.6/src/includes/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.6/src/includes/admin/classes/class-bbp-admin.php
r7071 r7089 586 586 // Loop through fields for this section 587 587 foreach ( (array) $fields as $field_id => $field ) { 588 589 // Skip field if user is not capable 590 if ( ! empty( $field['capability'] ) && ! current_user_can( $field['capability'] ) ) { 591 continue; 592 } 588 593 589 594 // Add the field -
branches/2.6/src/includes/admin/settings.php
r6966 r7089 164 164 'bbp_settings_features' => array( 165 165 166 // Allow auto embedding setting 167 '_bbp_use_autoembed' => array( 168 'title' => esc_html__( 'Auto-embed links', 'bbpress' ), 169 'callback' => 'bbp_admin_setting_callback_use_autoembed', 170 'sanitize_callback' => 'intval', 171 'args' => array() 172 ), 173 174 // Set reply threading level 175 '_bbp_thread_replies_depth' => array( 176 'title' => esc_html__( 'Reply Threading', 'bbpress' ), 177 'callback' => 'bbp_admin_setting_callback_thread_replies_depth', 178 'sanitize_callback' => 'intval', 179 'args' => array() 180 ), 181 182 // Allow threaded replies 183 '_bbp_allow_threaded_replies' => array( 184 'sanitize_callback' => 'intval', 185 'args' => array() 186 ), 187 166 188 // Allow topic and reply revisions 167 189 '_bbp_allow_revisions' => array( … … 200 222 'title' => esc_html__( 'Topic tags', 'bbpress' ), 201 223 'callback' => 'bbp_admin_setting_callback_topic_tags', 202 'sanitize_callback' => 'intval',203 'args' => array()204 ),205 206 // Allow per-forum moderators207 '_bbp_allow_forum_mods' => array(208 'title' => esc_html__( 'Forum Moderators', 'bbpress' ),209 'callback' => 'bbp_admin_setting_callback_forum_mods',210 'sanitize_callback' => 'intval',211 'args' => array()212 ),213 214 // Allow moderators to edit users215 '_bbp_allow_super_mods' => array(216 'title' => esc_html__( 'Super Moderators', 'bbpress' ),217 'callback' => 'bbp_admin_setting_callback_super_mods',218 224 'sanitize_callback' => 'intval', 219 225 'args' => array() … … 236 242 ), 237 243 238 // Allow auto embedding setting239 '_bbp_ use_autoembed' => array(240 'title' => esc_html__( ' Auto-embed links', 'bbpress' ),241 'callback' => 'bbp_admin_setting_callback_ use_autoembed',244 // Allow per-forum moderators 245 '_bbp_allow_forum_mods' => array( 246 'title' => esc_html__( 'Forum Moderators', 'bbpress' ), 247 'callback' => 'bbp_admin_setting_callback_forum_mods', 242 248 'sanitize_callback' => 'intval', 243 249 'args' => array() 244 250 ), 245 251 246 // Set reply threading level 247 '_bbp_thread_replies_depth' => array( 248 'title' => esc_html__( 'Reply Threading', 'bbpress' ), 249 'callback' => 'bbp_admin_setting_callback_thread_replies_depth', 250 'sanitize_callback' => 'intval', 251 'args' => array() 252 ), 253 254 // Allow threaded replies 255 '_bbp_allow_threaded_replies' => array( 256 'sanitize_callback' => 'intval', 252 // Allow moderators to edit users 253 '_bbp_allow_super_mods' => array( 254 'title' => esc_html__( 'Super Moderators', 'bbpress' ), 255 'callback' => 'bbp_admin_setting_callback_super_mods', 256 'sanitize_callback' => 'intval', 257 'capability' => 'edit_users', 257 258 'args' => array() 258 259 ) … … 838 839 <input name="_bbp_allow_forum_mods" id="_bbp_allow_forum_mods" type="checkbox" value="1" <?php checked( bbp_allow_forum_mods( true ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_forum_mods' ); ?> /> 839 840 <label for="_bbp_allow_forum_mods"><?php esc_html_e( 'Allow forums to have dedicated moderators', 'bbpress' ); ?></label> 841 <p class="description"><?php esc_html_e( 'This does not include the ability to edit users.', 'bbpress' ); ?></p> 840 842 841 843 <?php … … 851 853 852 854 <input name="_bbp_allow_super_mods" id="_bbp_allow_super_mods" type="checkbox" value="1" <?php checked( bbp_allow_super_mods( false ) ); bbp_maybe_admin_setting_disabled( '_bbp_allow_super_mods' ); ?> /> 853 <label for="_bbp_allow_super_mods"><?php esc_html_e( 'Allow moderators to edit other users', 'bbpress' ); ?></label> 855 <label for="_bbp_allow_super_mods"><?php esc_html_e( 'Allow Moderators and Keymasters to edit users', 'bbpress' ); ?></label> 856 <p class="description"><?php esc_html_e( 'This includes roles, passwords, and email addresses.', 'bbpress' ); ?></p> 854 857 855 858 <?php … … 969 972 if ( ! empty( $theme_options ) ) : ?> 970 973 971 <select name="_bbp_theme_package_id" id="_bbp_theme_package_id" <?php bbp_maybe_admin_setting_disabled( '_bbp_theme_package_id' ); ?>><?php echo $theme_options ?></select>974 <select name="_bbp_theme_package_id" id="_bbp_theme_package_id" <?php bbp_maybe_admin_setting_disabled( '_bbp_theme_package_id' ); ?>><?php echo $theme_options; ?></select> 972 975 <label for="_bbp_theme_package_id"><?php esc_html_e( 'will serve all bbPress templates', 'bbpress' ); ?></label> 973 976 … … 1465 1468 // Button & text 1466 1469 $button = '<a href="' . esc_url( $new_url ) . '">' . esc_html__( 'create a new one', 'bbpress' ) . '</a>'; 1467 $text = esc_html__( 'Use %s to contain your group forums, or %s', 'bbpress' ); 1470 $text = esc_html__( 'Use %s to contain your group forums, or %s', 'bbpress' ); //phpcs:ignore 1468 1471 } else { 1469 1472 $text = esc_html__( 'Use %s to contain your group forums', 'bbpress' ); … … 1518 1521 1519 1522 <div class="wrap"> 1520 <h1 class="wp-heading-inline"><?php esc_html_e( 'Forums Settings', 'bbpress' ) ?></h1>1523 <h1 class="wp-heading-inline"><?php esc_html_e( 'Forums Settings', 'bbpress' ); ?></h1> 1521 1524 <hr class="wp-header-end"> 1522 1525 … … 1568 1571 } ?> 1569 1572 1570 <select name="_bbp_converter_platform" id="_bbp_converter_platform"><?php echo $options ?></select>1573 <select name="_bbp_converter_platform" id="_bbp_converter_platform"><?php echo $options; ?></select> 1571 1574 <p class="description"><?php esc_html_e( 'The previous forum software', 'bbpress' ); ?></p> 1572 1575 … … 1793 1796 // Starting or continuing? 1794 1797 $progress_text = ! empty( $step ) 1795 ? sprintf( esc_html__( 'Previously stopped at step % d of %d', 'bbpress' ), $step, $max )1798 ? sprintf( esc_html__( 'Previously stopped at step %1$d of %2$d', 'bbpress' ), $step, $max ) 1796 1799 : esc_html__( 'Ready to go.', 'bbpress' ); ?> 1797 1800 … … 1958 1961 * @param bool $slug 1959 1962 */ 1960 function bbp_form_option( $option, $default = '' 1963 function bbp_form_option( $option, $default = '', $slug = false ) { 1961 1964 echo bbp_get_form_option( $option, $default, $slug ); 1962 1965 }
Note: See TracChangeset
for help on using the changeset viewer.