Changeset 6563
- Timestamp:
- 06/16/2017 04:56:02 PM (8 years ago)
- Location:
- trunk/src/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/settings.php
r6544 r6563 208 208 'title' => esc_html__( 'Forum Moderators', 'bbpress' ), 209 209 'callback' => 'bbp_admin_setting_callback_forum_mods', 210 'sanitize_callback' => 'intval', 211 'args' => array() 212 ), 213 214 // Allow moderators to edit users 215 '_bbp_allow_super_mods' => array( 216 'title' => esc_html__( 'Super Moderators', 'bbpress' ), 217 'callback' => 'bbp_admin_setting_callback_super_mods', 210 218 'sanitize_callback' => 'intval', 211 219 'args' => array() … … 832 840 <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' ); ?> /> 833 841 <label for="_bbp_allow_forum_mods"><?php esc_html_e( 'Allow forums to have dedicated moderators', 'bbpress' ); ?></label> 842 843 <?php 844 } 845 846 /** 847 * Allow super-mods setting field 848 * 849 * @since 2.6.0 bbPress (r6562) 850 * 851 * @uses checked() To display the checked attribute 852 */ 853 function bbp_admin_setting_callback_super_mods() { 854 ?> 855 856 <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' ); ?> /> 857 <label for="_bbp_allow_super_mods"><?php esc_html_e( 'Allow moderators to edit other users', 'bbpress' ); ?></label> 834 858 835 859 <?php -
trunk/src/includes/core/options.php
r6544 r6563 43 43 '_bbp_allow_topic_tags' => 1, // Allow topic tagging 44 44 '_bbp_allow_forum_mods' => 1, // Allow per-forum moderation 45 '_bbp_allow_super_mods' => 0, // Allow mods to edit users 45 46 '_bbp_allow_threaded_replies' => 0, // Allow threaded replies 46 47 '_bbp_allow_search' => 1, // Allow forum-wide search … … 409 410 * 410 411 * @param bool $default Optional. Default value true. 411 * @uses get_option() To get the allow per-forum moderators 412 * @uses get_option() To get the allow per-forum moderators setting 412 413 * 413 414 * @return bool Are per-forum moderators allowed? … … 417 418 // Filter & return 418 419 return (bool) apply_filters( 'bbp_allow_forum_mods', (bool) get_option( '_bbp_allow_forum_mods', $default ) ); 420 } 421 422 /** 423 * Are moderators allowed to edit users 424 * 425 * @since 2.6.0 bbPress (r6562) 426 * 427 * @param bool $default Optional. Default value true. 428 * @uses get_option() To get the allow super moderators setting 429 * 430 * @return bool Are moderators allowed to edit users? 431 */ 432 function bbp_allow_super_mods( $default = 0 ) { 433 434 // Filter & return 435 return (bool) apply_filters( 'bbp_allow_super_mods', (bool) get_option( '_bbp_allow_super_mods', $default ) ); 419 436 } 420 437
Note: See TracChangeset
for help on using the changeset viewer.