BP_Groups_Theme_Compat::is_group()
Are we looking at something that needs group theme compatibility?
Description
Source
File: bp-groups/classes/class-bp-groups-theme-compat.php
public function is_group() {
// Bail if not looking at a group.
if ( ! bp_is_groups_component() )
return;
// Group Directory.
if ( bp_is_groups_directory() ) {
bp_update_is_directory( true, 'groups' );
/**
* Fires at the start of the group theme compatibility setup.
*
* @since BuddyPress 1.1.0
*/
do_action( 'groups_directory_groups_setup' );
add_filter( 'bp_get_buddypress_template', array( $this, 'directory_template_hierarchy' ) );
add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
add_filter( 'bp_replace_the_content', array( $this, 'directory_content' ) );
// Creating a group.
} elseif ( bp_is_groups_component() && bp_is_current_action( 'create' ) ) {
add_filter( 'bp_get_buddypress_template', array( $this, 'create_template_hierarchy' ) );
add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'create_dummy_post' ) );
add_filter( 'bp_replace_the_content', array( $this, 'create_content' ) );
// Group page.
} elseif ( bp_is_single_item() ) {
add_filter( 'bp_get_buddypress_template', array( $this, 'single_template_hierarchy' ) );
add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post' ) );
add_filter( 'bp_replace_the_content', array( $this, 'single_content' ) );
}
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 1.7.0 | 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.