bp_nouveau_group_reset_front_template( array $templates = array(), BP_Groups_Group $group = null )
Add the default group front template to the front template hierarchy.
Description
Parameters
- $templates
-
(Optional) The list of templates for the front.php template part.
Default value: array()
- $group
-
(Optional) The group object.
Default value: null
Return
(array) The same list with the default front template if needed.
Source
File: bp-templates/bp-nouveau/includes/groups/functions.php
function bp_nouveau_group_reset_front_template( $templates = array(), $group = null ) { if ( empty( $group->id ) ) { return $templates; } $use_default_front = bp_nouveau_get_appearance_settings( 'group_front_page' ); // Setting the front template happens too early, so we need this! if ( is_customize_preview() ) { $use_default_front = bp_nouveau_get_temporary_setting( 'group_front_page', $use_default_front ); } if ( ! empty( $use_default_front ) ) { array_push( $templates, 'groups/single/default-front.php' ); } /** * Filters the BuddyPress Nouveau template hierarchy after resetting front template for groups. * * @since BuddyPress 3.0.0 * * @param array $templates Array of templates. */ return apply_filters( '_bp_nouveau_group_reset_front_template', $templates ); }
Changelog
Version | Description |
---|---|
BuddyPress 3.0.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.