BuddyPress::register_theme_packages()
Register bundled theme packages.
Description Description
Note that since we currently have complete control over bp-themes and the bp-legacy folders, it’s fine to hardcode these here. If at a later date we need to automate this, an API will need to be built.
Source Source
File: class-buddypress.php
public function register_theme_packages() {
// Register the default theme compatibility package
bp_register_theme_package( array(
'id' => 'legacy',
'name' => __( 'BuddyPress Legacy', 'buddypress' ),
'version' => bp_get_version(),
'dir' => trailingslashit( $this->themes_dir . '/bp-legacy' ),
'url' => trailingslashit( $this->themes_url . '/bp-legacy' )
) );
bp_register_theme_package( array(
'id' => 'nouveau',
'name' => __( 'BuddyPress Nouveau', 'buddypress' ),
'version' => bp_get_version(),
'dir' => trailingslashit( $this->themes_dir . '/bp-nouveau' ),
'url' => trailingslashit( $this->themes_url . '/bp-nouveau' )
) );
// Register the basic theme stack. This is really dope.
bp_register_template_stack( 'get_stylesheet_directory', 10 );
bp_register_template_stack( 'get_template_directory', 12 );
bp_register_template_stack( 'bp_get_theme_compat_dir', 14 );
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.7.0 | Introduced. |