Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/20/2011 03:39:22 PM (14 years ago)
Author:
boonebgorges
Message:

Adds template tags to fetch the current group id, slug, and object

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-functions.php

    r4648 r4729  
    414414
    415415    return $count;
     416}
     417
     418/**
     419 * Returns the group object for the group currently being viewed
     420 *
     421 * @package BuddyPress
     422 * @since 1.3
     423 *
     424 * @return obj The current group object
     425 */
     426function groups_get_current_group() {
     427    global $bp;
     428   
     429    $current_group = isset( $bp->groups->current_group ) ? $bp->groups->current_group : false;
     430   
     431    return apply_filters( 'groups_get_current_group', $current_group );
    416432}
    417433
Note: See TracChangeset for help on using the changeset viewer.