Changeset 6419 for trunk/src/includes/core/options.php
- Timestamp:
- 05/19/2017 04:52:16 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/core/options.php
r6323 r6419 48 48 '_bbp_theme_package_id' => 'default', // The ID for the current theme package 49 49 '_bbp_default_role' => bbp_get_participant_role(), // Default forums role 50 '_bbp_settings_integration' => 0, // Put settings into existing admin pages50 '_bbp_settings_integration' => 'basic', // How to integrate into wp-admin 51 51 52 52 /** Per Page **********************************************************/ … … 479 479 * Integrate settings into existing WordPress pages 480 480 * 481 * There are 3 possible modes: 482 * - 'basic' Traditional admin integration 483 * - 'compact' One "bbPress" top-level admin menu 484 * - 'deep' Deeply integrate with the WordPress admin interface 485 * 481 486 * @since 2.4.0 bbPress (r4932) 482 487 * … … 485 490 * @return bool To deeply integrate settings, or not 486 491 */ 487 function bbp_settings_integration( $default = 0 ) { 488 return (bool) apply_filters( 'bbp_settings_integration', (bool) get_option( '_bbp_settings_integration', $default ) ); 492 function bbp_settings_integration( $default = 'basic' ) { 493 494 // Get the option value 495 $integration = get_option( '_bbp_settings_integration', $default ); 496 497 // Back-compat for deep/basic (pre-2.6) 498 if ( is_numeric( $integration ) ) { 499 $integration = ( 1 === (int) $integration ) 500 ? 'deep' 501 : 'basic'; 502 } 503 504 // Fallback to 'none' if invalid 505 if ( ! in_array( $integration, array( 'basic', 'deep', 'compact' ), true ) ) { 506 $integration = 'basic'; 507 } 508 509 // Filter & return 510 return apply_filters( 'bbp_settings_integration', $integration, $default ); 489 511 } 490 512
Note: See TracChangeset
for help on using the changeset viewer.