Changeset 2675
- Timestamp:
- 02/11/2010 02:50:47 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-classes.php
r2644 r2675 47 47 global $wpdb, $bp, $current_user; 48 48 49 do_action( 'bp_activity_before_save', $this ); 49 do_action( 'bp_activity_before_save', &$this ); 50 51 $this->id = apply_filters( 'bp_activity_id_before_save', $this->id, &$this ); 52 $this->item_id = apply_filters( 'bp_activity_item_id_before_save', $this->item_id, &$this ); 53 $this->secondary_item_id = apply_filters( 'bp_activity_secondary_item_id_before_save', $this->secondary_item_id, &$this ); 54 $this->user_id = apply_filters( 'bp_activity_user_id_before_save', $this->user_id, &$this ); 55 $this->primary_link = apply_filters( 'bp_activity_primary_link_before_save', $this->primary_link, &$this ); 56 $this->component = apply_filters( 'bp_activity_component_before_save', $this->component, &$this ); 57 $this->type = apply_filters( 'bp_activity_type_before_save', $this->type, &$this ); 58 $this->action = apply_filters( 'bp_activity_action_before_save', $this->action, &$this ); 59 $this->content = apply_filters( 'bp_activity_content_before_save', $this->content, &$this ); 60 $this->date_recorded = apply_filters( 'bp_activity_date_recorded_before_save', $this->date_recorded, &$this ); 61 $this->hide_sitewide = apply_filters( 'bp_activity_hide_sitewide_before_save', $this->hide_sitewide, &$this ); 62 $this->mptt_left = apply_filters( 'bp_activity_mptt_left_before_save', $this->mptt_left, &$this ); 63 $this->mptt_right = apply_filters( 'bp_activity_mptt_right_before_save', $this->mptt_right, &$this ); 50 64 51 65 if ( !$this->component || !$this->type ) … … 67 81 $this->id = $wpdb->insert_id; 68 82 69 do_action( 'bp_activity_after_save', $this );83 do_action( 'bp_activity_after_save', &$this ); 70 84 return true; 71 85 } … … 280 294 return false; 281 295 296 error_log( $where_sql ); 297 282 298 /* Fetch the activity IDs so we can delete any comments for this activity item */ 283 299 $activity_ids = $wpdb->get_col( $wpdb->prepare( "SELECT id FROM {$bp->activity->table_name} {$where_sql}" ) ); -
trunk/bp-activity/bp-activity-filters.php
r2672 r2675 2 2 3 3 /* Apply WordPress defined filters */ 4 add_filter( 'bp_get_activity_action', 'bp_activity_filter_kses', 1 ); 5 add_filter( 'bp_get_activity_content_body', 'bp_activity_filter_kses', 1 ); 4 6 add_filter( 'bp_get_activity_content', 'bp_activity_filter_kses', 1 ); 5 7 add_filter( 'bp_get_activity_parent_content', 'bp_activity_filter_kses', 1 ); 6 8 add_filter( 'bp_get_activity_latest_update', 'bp_activity_filter_kses', 1 ); 7 9 add_filter( 'bp_get_activity_feed_item_description', 'bp_activity_filter_kses', 1 ); 10 add_filter( 'bp_activity_content_before_save', 'bp_activity_filter_kses', 1 ); 11 add_filter( 'bp_activity_action_before_save', 'bp_activity_filter_kses', 1 ); 8 12 13 add_filter( 'bp_get_activity_action', 'force_balance_tags' ); 14 add_filter( 'bp_get_activity_content_body', 'force_balance_tags' ); 9 15 add_filter( 'bp_get_activity_content', 'force_balance_tags' ); 10 16 add_filter( 'bp_get_activity_latest_update', 'force_balance_tags' ); 11 17 add_filter( 'bp_get_activity_feed_item_description', 'force_balance_tags' ); 12 18 19 add_filter( 'bp_get_activity_action', 'wptexturize' ); 20 add_filter( 'bp_get_activity_content_body', 'wptexturize' ); 13 21 add_filter( 'bp_get_activity_content', 'wptexturize' ); 14 22 add_filter( 'bp_get_activity_parent_content', 'wptexturize' ); 15 23 add_filter( 'bp_get_activity_latest_update', 'wptexturize' ); 16 24 25 add_filter( 'bp_get_activity_action', 'convert_smilies' ); 26 add_filter( 'bp_get_activity_content_body', 'convert_smilies' ); 17 27 add_filter( 'bp_get_activity_content', 'convert_smilies' ); 18 28 add_filter( 'bp_get_activity_parent_content', 'convert_smilies' ); 19 29 add_filter( 'bp_get_activity_latest_update', 'convert_smilies' ); 20 30 31 add_filter( 'bp_get_activity_action', 'convert_chars' ); 32 add_filter( 'bp_get_activity_content_body', 'convert_chars' ); 21 33 add_filter( 'bp_get_activity_content', 'convert_chars' ); 22 34 add_filter( 'bp_get_activity_parent_content', 'convert_chars' ); 23 35 add_filter( 'bp_get_activity_latest_update', 'convert_chars' ); 24 36 37 add_filter( 'bp_get_activity_action', 'wpautop' ); 38 add_filter( 'bp_get_activity_content_body', 'wpautop' ); 25 39 add_filter( 'bp_get_activity_content', 'wpautop' ); 26 40 add_filter( 'bp_get_activity_feed_item_description', 'wpautop' ); 27 41 42 add_filter( 'bp_get_activity_action', 'make_clickable' ); 43 add_filter( 'bp_get_activity_content_body', 'make_clickable' ); 28 44 add_filter( 'bp_get_activity_content', 'make_clickable' ); 29 45 add_filter( 'bp_get_activity_parent_content', 'make_clickable' ); … … 31 47 add_filter( 'bp_get_activity_feed_item_description', 'make_clickable' ); 32 48 49 add_filter( 'bp_get_activity_action', 'stripslashes_deep' ); 33 50 add_filter( 'bp_get_activity_content', 'stripslashes_deep' ); 51 add_filter( 'bp_get_activity_content_body', 'stripslashes_deep' ); 34 52 add_filter( 'bp_get_activity_parent_content', 'stripslashes_deep' ); 35 53 add_filter( 'bp_get_activity_latest_update', 'stripslashes_deep' ); -
trunk/bp-groups.php
r2662 r2675 1628 1628 } 1629 1629 1630 $membership = new BP_Groups_Member( $user_id, $group_id ); 1631 1630 1632 // This is exactly the same as deleting an invite, just is_confirmed = 1 NOT 0. 1631 1633 if ( !groups_uninvite_user( $user_id, $group_id ) ) … … 1637 1639 /* Modify user's group memberhip count */ 1638 1640 update_usermeta( $user_id, 'total_group_count', (int) get_usermeta( $user_id, 'total_group_count') - 1 ); 1641 1642 /* If the user joined this group less than five minutes ago, remove the joined_group activity so 1643 * users cannot flood the activity stream by joining/leaving the group in quick succession. 1644 */ 1645 if ( function_exists( 'bp_activity_delete' ) && gmmktime() <= strtotime( '+5 minutes', (int)strtotime( $membership->date_modified ) ) ) 1646 bp_activity_delete( array( 'component' => $bp->groups->id, 'type' => 'joined_group', 'user_id' => $user_id, 'item_id' => $group_id ) ); 1639 1647 1640 1648 bp_core_add_message( __( 'You successfully left the group.', 'buddypress' ) );
Note: See TracChangeset
for help on using the changeset viewer.