Changeset 1749 for trunk/bp-groups.php
- Timestamp:
- 09/01/2009 01:45:37 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-groups.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups.php
r1729 r1749 148 148 149 149 $bp->groups->valid_status = apply_filters( 'groups_valid_status', array( 'public', 'private', 'hidden' ) ); 150 151 return $bp; 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' ) ); 152 157 } 153 158 add_action( 'plugins_loaded', 'groups_setup_globals', 5 ); … … 1397 1402 } 1398 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 } 1412 1399 1413 function groups_update_last_activity( $group_id ) { 1400 1414 groups_update_groupmeta( $group_id, 'last_activity', time() ); … … 1663 1677 /* Delete the activity stream item */ 1664 1678 if ( function_exists( 'bp_activity_delete_by_item_id' ) ) { 1665 bp_activity_delete_by_item_id( array( 'item_id' => $group_id, 'component_name' => 'groups', 'component_action' => 'created_group') );1679 bp_activity_delete_by_item_id( array( 'item_id' => $group_id, 'component_name' => 'groups', 'component_action' => $bp->activity->actions->groups['created_group'] ) ); 1666 1680 } 1667 1681 … … 1978 1992 /* Delete the activity stream item */ 1979 1993 if ( function_exists( 'bp_activity_delete_by_item_id' ) ) { 1980 bp_activity_delete_by_item_id( array( 'item_id' => $wire_post_id, 'component_name' => 'groups', 'component_action' => 'new_wire_post') );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'] ) ); 1981 1995 } 1982 1996 … … 2066 2080 if ( $topic = bp_forums_update_topic( array( 'topic_title' => $topic_title, 'topic_text' => $topic_text, 'topic_id' => $topic_id ) ) ) { 2067 2081 /* Update the activity stream item */ 2068 bp_activity_delete_by_item_id( array( 'item_id' => $topic_id, 'component_name' => 'groups', 'component_action' => 'new_forum_topic') );2082 bp_activity_delete_by_item_id( array( 'item_id' => $topic_id, 'component_name' => 'groups', 'component_action' => $bp->activity->actions->groups['new_forum_topic'] ) ); 2069 2083 2070 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>' ); … … 2096 2110 /* Delete the activity stream item */ 2097 2111 if ( function_exists( 'bp_activity_delete_by_item_id' ) ) { 2098 bp_activity_delete_by_item_id( array( 'item_id' => $topic_id, 'component_name' => 'groups', 'component_action' => 'new_forum_topic') );2112 bp_activity_delete_by_item_id( array( 'item_id' => $topic_id, 'component_name' => 'groups', 'component_action' => $bp->activity->actions->groups['new_forum_topic'] ) ); 2099 2113 bp_activity_delete_by_item_id( array( 'item_id' => $topic_id, 'component_name' => 'groups', 'component_action' => 'new_forum_post' ) ); 2100 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)