Skip to:
Content

BuddyPress.org

Changeset 2158 for trunk/bp-groups.php


Ignore:
Timestamp:
11/30/2009 12:27:52 PM (16 years ago)
Author:
apeatling
Message:

Adding activity item permalink support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups.php

    r2147 r2158  
    575575}
    576576
    577 
    578577function groups_screen_group_home() {
    579578    global $bp;
    580579
    581580    if ( $bp->is_single_item ) {
    582 
    583581        if ( isset($_GET['new']) ) {
    584582            // Delete group request notifications for the user
     
    975973    }
    976974}
     975
     976function groups_screen_group_activity_permalink() {
     977    global $bp;
     978
     979    if ( !$bp->is_single_item || $bp->current_component != $bp->groups->slug || $bp->current_action != $bp->activity->slug )
     980        return false;
     981
     982    if ( '' != locate_template( array( 'groups/single/home.php' ), false ) )
     983        bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ) );
     984    else
     985        bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/group-home' ) );
     986}
     987add_action( 'wp', 'groups_screen_group_activity_permalink', 3 );
    977988
    978989function groups_screen_group_admin() {
     
    16071618 */
    16081619
     1620function groups_get_group( $args = '' ) {
     1621    $defaults = array(
     1622        'group_id' => false,
     1623        'load_users' => false
     1624    );
     1625
     1626    $args = wp_parse_args( $args, $defaults );
     1627    extract( $args, EXTR_SKIP );
     1628
     1629    return apply_filters( 'groups_get_group', new BP_Groups_Group( $group_id, true, $load_users ) );
     1630}
     1631
    16091632/*** Group Creation, Editing & Deletion *****************************************/
    16101633
Note: See TracChangeset for help on using the changeset viewer.