bp_nouveau_group_template_part()
Load the appropriate content for the single group pages
Description
Source
File: bp-templates/bp-nouveau/includes/groups/template-tags.php
1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 | function bp_nouveau_group_template_part() { /** * Fires before the display of the group home body. * * @since BuddyPress 1.2.0 */ do_action( 'bp_before_group_body' ); $bp_is_group_home = bp_is_group_home(); if ( $bp_is_group_home && ! bp_current_user_can( 'groups_access_group' ) ) { /** * Fires before the display of the group status message. * * @since BuddyPress 1.1.0 */ do_action( 'bp_before_group_status_message' ); ?> <div id= "message" class = "info" > <p><?php bp_group_status_message(); ?></p> </div> <?php /** * Fires after the display of the group status message. * * @since BuddyPress 1.1.0 */ do_action( 'bp_after_group_status_message' ); // We have a front template, Use BuddyPress function to load it. } elseif ( $bp_is_group_home && false !== bp_groups_get_front_template() ) { bp_groups_front_template_part(); // Otherwise use BP_Nouveau template hierarchy } else { $template = 'plugins' ; // the home page if ( $bp_is_group_home ) { if ( bp_is_active( 'activity' ) ) { $template = 'activity' ; } else { $template = 'members' ; } // Not the home page } elseif ( bp_is_group_admin_page() ) { $template = 'admin' ; } elseif ( bp_is_group_activity() ) { $template = 'activity' ; } elseif ( bp_is_group_members() ) { $template = 'members' ; } elseif ( bp_is_group_subgroups() ) { $template = 'subgroups' ; } elseif ( bp_is_group_invites() ) { $template = 'send-invites' ; } elseif ( bp_is_group_membership_request() ) { $template = 'request-membership' ; } elseif ( bp_is_group_media() ) { $template = 'photos' ; } elseif ( bp_is_group_albums() ) { $template = 'albums' ; } bp_nouveau_group_get_template_part( $template ); } /** * Fires after the display of the group home body. * * @since BuddyPress 1.2.0 */ do_action( 'bp_after_group_body' ); } |
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.