bbp_register_theme_package( array $theme = array(), $override = true )
Register a new Forums theme package to the active theme packages array
Description
Parameters
- $theme
-
(array) (Optional)
Default value: array()
Source
File: bp-forums/core/theme-compat.php
function bbp_register_theme_package( $theme = array(), $override = true ) { // Create new BBP_Theme_Compat object from the $theme array if ( is_array( $theme ) ) $theme = new BBP_Theme_Compat( $theme ); // Bail if $theme isn't a proper object if ( ! is_a( $theme, 'BBP_Theme_Compat' ) ) return; // Load up Forums $bbp = bbpress(); // Only override if the flag is set and not previously registered if ( empty( $bbp->theme_compat->packages[$theme->id] ) || ( true === $override ) ) { $bbp->theme_compat->packages[$theme->id] = $theme; } }
Changelog
Version | Description |
---|---|
bbPress (r3829) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.