Changeset 10891
- Timestamp:
- 06/21/2016 07:16:38 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r10847 r10891 4187 4187 * 4188 4188 * @since 2.4.0 4189 * @since 2.6.0 Adds the Group Type to the front template hierarchy. 4189 4190 * 4190 4191 * @param BP_Groups_Group|null $group Optional. Falls back to current group if not passed. … … 4204 4205 } 4205 4206 4206 /** 4207 * Filters the hierarchy of group front templates corresponding to a specific group. 4208 * 4209 * @since 2.4.0 4210 * @since 2.5.0 Added the `$group` parameter. 4211 * 4212 * @param array $template_names Array of template paths. 4213 * @param object $group Group object. 4214 */ 4215 $template_names = apply_filters( 'bp_groups_get_front_template', array( 4207 $template_names = array( 4216 4208 'groups/single/front-id-' . sanitize_file_name( $group->id ) . '.php', 4217 4209 'groups/single/front-slug-' . sanitize_file_name( $group->slug ) . '.php', 4210 ); 4211 4212 if ( bp_groups_get_group_types() ) { 4213 $group_type = bp_groups_get_group_type( $group->id ); 4214 if ( ! $group_type ) { 4215 $group_type = 'none'; 4216 } 4217 4218 $template_names[] = 'groups/single/front-group-type-' . sanitize_file_name( $group_type ) . '.php'; 4219 } 4220 4221 $template_names = array_merge( $template_names, array( 4218 4222 'groups/single/front-status-' . sanitize_file_name( $group->status ) . '.php', 4219 4223 'groups/single/front.php' 4220 4224 ) ); 4221 4225 4222 return bp_locate_template( $template_names, false, true ); 4226 /** 4227 * Filters the hierarchy of group front templates corresponding to a specific group. 4228 * 4229 * @since 2.4.0 4230 * @since 2.5.0 Added the `$group` parameter. 4231 * 4232 * @param array $template_names Array of template paths. 4233 * @param object $group Group object. 4234 */ 4235 return bp_locate_template( apply_filters( 'bp_groups_get_front_template', $template_names, $group ), false, true ); 4223 4236 } 4224 4237
Note: See TracChangeset
for help on using the changeset viewer.