Skip to:
Content

BuddyPress.org

Changeset 1852 for trunk/bp-groups.php


Ignore:
Timestamp:
09/10/2009 08:36:48 PM (16 years ago)
Author:
apeatling
Message:

Adding filters to all activity recording functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups.php

    r1829 r1852  
    347347
    348348            groups_record_activity( array(
    349                 'content' => sprintf( __( '%s joined the group %s', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $group ) . '">' . attribute_escape( $group->name ) . '</a>' ),
    350                 'primary_link' => bp_get_group_permalink( $group ),
     349                'content' => apply_filters( 'groups_activity_accepted_invite', sprintf( __( '%s joined the group %s', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $group ) . '">' . attribute_escape( $group->name ) . '</a>' ), $bp->loggedin_user->id, &$group ),
     350                'primary_link' => apply_filters( 'groups_activity_accepted_invite_primary_link', bp_get_group_permalink( $group ), &$group ),
    351351                'component_action' => 'joined_group',
    352352                'item_id' => $group->id
     
    490490            /* Once we compelete all steps, record the group creation in the activity stream. */
    491491            groups_record_activity( array(
    492                 'content' => sprintf( __( '%s created the group %s', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ),
    493                 'primary_link' => bp_get_group_permalink( $bp->groups->current_group ),
     492                'content' => apply_filters( 'groups_activity_created_group', sprintf( __( '%s created the group %s', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ) ),
     493                'primary_link' => apply_filters( 'groups_activity_created_group_primary_link', bp_get_group_permalink( $bp->groups->current_group ) ),
    494494                'component_action' => 'created_group',
    495495                'item_id' => $bp->groups->new_group_id
     
    17811781    /* Record this in activity streams */
    17821782    groups_record_activity( array(
    1783         'content' => sprintf( __( '%s joined the group %s', 'buddypress'), bp_core_get_userlink( $user_id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ),
    1784         'primary_link' => bp_get_group_permalink( $bp->groups->current_group ),
     1783        'content' => apply_filters( 'groups_activity_joined_group', sprintf( __( '%s joined the group %s', 'buddypress'), bp_core_get_userlink( $user_id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ) ),
     1784        'primary_link' => apply_filters( 'groups_activity_joined_group_primary_link', bp_get_group_permalink( $bp->groups->current_group ) ),
    17851785        'component_action' => 'joined_group',
    17861786        'item_id' => $bp->groups->current_group->id
     
    19851985       
    19861986        groups_record_activity( array(
    1987             'content' => $activity_content,
    1988             'primary_link' => bp_get_group_permalink( $bp->groups->current_group ),
     1987            'content' => apply_filters( 'groups_activity_new_wire_post', $activity_content ),
     1988            'primary_link' => apply_filters( 'groups_activity_new_wire_post_primary_link', bp_get_group_permalink( $bp->groups->current_group ) ),
    19891989            'component_action' => 'new_wire_post',
    19901990            'item_id' => $bp->groups->current_group->id,
     
    20462046        /* Record this in activity streams */
    20472047        groups_record_activity( array(
    2048             'content' => $activity_content,
    2049             'primary_link' => bp_get_group_permalink( $bp->groups->current_group ),
     2048            'content' => apply_filters( 'groups_activity_new_forum_post', $activity_content, $post_text, &$topic, &$forum_post ),
     2049            'primary_link' => apply_filters( 'groups_activity_new_forum_post_primary_link', bp_get_group_permalink( $bp->groups->current_group ) ),
    20502050            'component_action' => 'new_forum_post',
    20512051            'item_id' => $bp->groups->current_group->id,
     
    20722072        /* Record this in activity streams */
    20732073        groups_record_activity( array(
    2074             'content' => $activity_content,
    2075             'primary_link' => bp_get_group_permalink( $bp->groups->current_group ),
     2074            'content' => apply_filters( 'groups_activity_new_forum_topic', $activity_content, $topic_text, &$topic ),
     2075            'primary_link' => apply_filters( 'groups_activity_new_forum_topic_primary_link', bp_get_group_permalink( $bp->groups->current_group ) ),
    20762076            'component_action' => 'new_forum_topic',
    20772077            'item_id' => $bp->groups->current_group->id,
     
    20992099        /* Record this in activity streams */
    21002100        groups_record_activity( array(
    2101             'content' => $activity_content,
    2102             'primary_link' => bp_get_group_permalink( $bp->groups->current_group ),
     2101            'content' => apply_filters( 'groups_activity_new_forum_topic', $activity_content, $topic_text, &$topic ),
     2102            'primary_link' => apply_filters( 'groups_activity_new_forum_topic_primary_link', bp_get_group_permalink( $bp->groups->current_group ) ),
    21032103            'component_action' => 'new_forum_topic',
    21042104            'item_id' => (int)$bp->groups->current_group->id,
     
    21502150        /* Record this in activity streams */
    21512151        groups_record_activity( array(
    2152             'content' => $activity_content,
    2153             'primary_link' => bp_get_group_permalink( $bp->groups->current_group ),
     2152            'content' => apply_filters( 'groups_activity_new_forum_post', $activity_content, $post_text, &$topic, &$forum_post ),
     2153            'primary_link' => apply_filters( 'groups_activity_new_forum_post_primary_link', bp_get_group_permalink( $bp->groups->current_group ) ),
    21542154            'component_action' => 'new_forum_post',
    21552155            'item_id' => $bp->groups->current_group->id,
     
    24012401
    24022402    groups_record_activity( array(
    2403         'content' => sprintf( __( '%s joined the group %s', 'buddypress'), bp_core_get_userlink( $user_id ), '<a href="' . bp_get_group_permalink( $group ) . '">' . attribute_escape( $group->name ) . '</a>' ),
    2404         'primary_link' => bp_get_group_permalink( $group ),
     2403        'content' => apply_filters( 'groups_activity_membership_accepted', sprintf( __( '%s joined the group %s', 'buddypress'), bp_core_get_userlink( $user_id ), '<a href="' . bp_get_group_permalink( $group ) . '">' . attribute_escape( $group->name ) . '</a>' ), $user_id, &$group ),
     2404        'primary_link' => apply_filters( 'groups_activity_membership_accepted_primary_link', bp_get_group_permalink( $group ), &$group ),
    24052405        'component_action' => 'joined_group',
    24062406        'item_id' => $group->id,
Note: See TracChangeset for help on using the changeset viewer.