-
-
Save anointed/1384958 to your computer and use it in GitHub Desktop.
Overriding the default bbpress theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Set the theme compat theme properties | |
* | |
* @since bbPress (r3311) | |
* | |
* @global bbPress $bbp | |
* @param BBP_Theme_Compat $theme | |
* @uses current_theme_supports() | |
*/ | |
function bbp_setup_new_theme_compat() { | |
global $bbp; | |
// Check if current theme supports bbPress | |
if (!current_theme_supports( 'bbpress' ) ) { | |
$theme = new BBP_Theme_Compat(); | |
$theme->name = 'bbPress (Twenty Ten)'; /* Change to the name you need */ | |
$theme->version = '20110912'; /* Update these as you update the theme */ | |
$theme->dir = WP_PLUGIN_DIR . '/twentyeleven-bbpress-child'; /* You might need to correct this */ | |
$theme->url = plugins_url('twentyeleven-bbpress-child'); /* Ditto */ | |
// Set the theme compat globals for help with loading template parts | |
$bbp->theme_compat->theme = $theme; | |
} | |
} | |
add_action( 'bbp_init', 'bbp_setup_new_theme_compat', 9 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment