Changeset 6419 for trunk/src/includes/admin/admin.php
- Timestamp:
- 05/19/2017 04:52:16 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/admin.php
r6395 r6419 181 181 add_filter( 'bbp_map_meta_caps', array( $this, 'map_settings_meta_caps' ), 10, 4 ); 182 182 183 // Hide the theme compat package selection184 add_filter( 'bbp_admin_get_settings_sections', array( $this, 'hide_theme_compat_packages' ) );185 186 183 // Allow keymasters to save forums settings 187 184 add_filter( 'option_page_capability_bbpress', array( $this, 'option_page_capability_bbpress' ) ); … … 247 244 248 245 // Are settings enabled? 249 if ( !bbp_settings_integration() ) {246 if ( 'basic' === bbp_settings_integration() ) { 250 247 add_options_page( 251 248 __( 'Forums', 'bbpress' ), … … 369 366 370 367 // Toggle the section if core integration is on 371 if ( ( true=== $settings_integration ) && ! empty( $section['page'] ) ) {368 if ( ( 'deep' === $settings_integration ) && ! empty( $section['page'] ) ) { 372 369 $page = $section['page']; 373 370 } else { … … 668 665 array( 'base' => '#f1f3f2', 'focus' => '#fff', 'current' => '#fff' ) 669 666 ); 670 }671 672 /**673 * Hide theme compat package selection if only 1 package is registered674 *675 * @since 2.2.0 bbPress (r4315)676 *677 * @param array $sections Forums settings sections678 * @return array679 */680 public function hide_theme_compat_packages( $sections = array() ) {681 if ( count( bbpress()->theme_compat->packages ) <= 1 ) {682 unset( $sections['bbp_settings_theme_compat'] );683 }684 685 return $sections;686 667 } 687 668
Note: See TracChangeset
for help on using the changeset viewer.