Changeset 1750 for trunk/bp-groups.php
- Timestamp:
- 09/01/2009 02:12:35 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-groups.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups.php
r1749 r1750 148 148 149 149 $bp->groups->valid_status = apply_filters( 'groups_valid_status', array( 'public', 'private', 'hidden' ) ); 150 151 /* Register the activity stream actions for this component */152 groups_register_activity_action( 'created_group', __( 'Created a group', 'buddypress' ) );153 groups_register_activity_action( 'joined_group', __( 'Joined a group', 'buddypress' ) );154 groups_register_activity_action( 'new_wire_post', __( 'New group wire post', 'buddypress' ) );155 groups_register_activity_action( 'new_forum_topic', __( 'New group forum topic', 'buddypress' ) );156 groups_register_activity_action( 'new_forum_post', __( 'New group forum post', 'buddypress' ) );157 150 } 158 151 add_action( 'plugins_loaded', 'groups_setup_globals', 5 ); … … 1374 1367 */ 1375 1368 1369 function groups_register_activity_actions() { 1370 global $bp; 1371 1372 if ( !function_exists( 'bp_activity_set_action' ) ) 1373 return false; 1374 1375 bp_activity_set_action( $bp->groups->id, 'created_group', __( 'Created a group', 'buddypress' ) ); 1376 bp_activity_set_action( $bp->groups->id, 'joined_group', __( 'Joined a group', 'buddypress' ) ); 1377 bp_activity_set_action( $bp->groups->id, 'new_wire_post', __( 'New group wire post', 'buddypress' ) ); 1378 bp_activity_set_action( $bp->groups->id, 'new_forum_topic', __( 'New group forum topic', 'buddypress' ) ); 1379 bp_activity_set_action( $bp->groups->id, 'new_forum_post', __( 'New group forum post', 'buddypress' ) ); 1380 1381 do_action( 'groups_register_activity_actions' ); 1382 } 1383 add_action( 'plugins_loaded', 'groups_register_activity_actions' ); 1384 1376 1385 function groups_record_activity( $args = '' ) { 1377 1386 global $bp; … … 1400 1409 1401 1410 return bp_activity_add( array( 'user_id' => $user_id, 'content' => $content, 'primary_link' => $primary_link, 'component_name' => $component_name, 'component_action' => $component_action, 'item_id' => $item_id, 'secondary_item_id' => $secondary_item_id, 'recorded_time' => $recorded_time, 'hide_sitewide' => $hide_sitewide ) ); 1402 }1403 1404 function groups_register_activity_action( $key, $value ) {1405 global $bp;1406 1407 if ( !function_exists( 'bp_activity_set_action' ) )1408 return false;1409 1410 return apply_filters( 'groups_register_activity_action', bp_activity_set_action( $bp->groups->id, $key, $value ), $key, $value );1411 1411 } 1412 1412 … … 1677 1677 /* Delete the activity stream item */ 1678 1678 if ( function_exists( 'bp_activity_delete_by_item_id' ) ) { 1679 bp_activity_delete_by_item_id( array( 'item_id' => $group_id, 'component_name' => 'groups', 'component_action' => $bp->activity->actions->groups['created_group']) );1679 bp_activity_delete_by_item_id( array( 'item_id' => $group_id, 'component_name' => 'groups', 'component_action' => 'created_group' ) ); 1680 1680 } 1681 1681 … … 1992 1992 /* Delete the activity stream item */ 1993 1993 if ( function_exists( 'bp_activity_delete_by_item_id' ) ) { 1994 bp_activity_delete_by_item_id( array( 'item_id' => $wire_post_id, 'component_name' => 'groups', 'component_action' => $bp->activity->actions->groups['new_wire_post']) );1994 bp_activity_delete_by_item_id( array( 'item_id' => $wire_post_id, 'component_name' => 'groups', 'component_action' => 'new_wire_post' ) ); 1995 1995 } 1996 1996 … … 2080 2080 if ( $topic = bp_forums_update_topic( array( 'topic_title' => $topic_title, 'topic_text' => $topic_text, 'topic_id' => $topic_id ) ) ) { 2081 2081 /* Update the activity stream item */ 2082 bp_activity_delete_by_item_id( array( 'item_id' => $topic_id, 'component_name' => 'groups', 'component_action' => $bp->activity->actions->groups['new_forum_topic']) );2082 bp_activity_delete_by_item_id( array( 'item_id' => $topic_id, 'component_name' => 'groups', 'component_action' => 'new_forum_topic' ) ); 2083 2083 2084 2084 $activity_content = sprintf( __( '%s started the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink( $topic->topic_poster ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '/forum/topic/' . $topic->topic_slug .'">' . attribute_escape( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ); … … 2110 2110 /* Delete the activity stream item */ 2111 2111 if ( function_exists( 'bp_activity_delete_by_item_id' ) ) { 2112 bp_activity_delete_by_item_id( array( 'item_id' => $topic_id, 'component_name' => 'groups', 'component_action' => $bp->activity->actions->groups['new_forum_topic']) );2112 bp_activity_delete_by_item_id( array( 'item_id' => $topic_id, 'component_name' => 'groups', 'component_action' => 'new_forum_topic' ) ); 2113 2113 bp_activity_delete_by_item_id( array( 'item_id' => $topic_id, 'component_name' => 'groups', 'component_action' => 'new_forum_post' ) ); 2114 2114 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)