Index: bp-activity.php
===================================================================
--- bp-activity.php	(revision 3608)
+++ bp-activity.php	(working copy)
@@ -280,6 +280,22 @@
 }
 add_action( 'wp', 'bp_activity_action_permalink_router', 3 );
 
+/**
+ * bp_activity_action_delete_activity()
+ *
+ * Delete specific activity item and redirect to previous page ( if applicable ).
+ *
+ * @package BuddyPress Activity
+ * @since 1.1
+ *
+ * @uses do_action() Calls 'bp_activity_action_delete_activity' hook to allow actions
+ * 	to be taken before the activity is deleted.	
+ * @uses bp_activity_delete()
+ * @uses bp_core_add_message()
+ * @uses bp_core_redirect()
+ *
+ * @global object $bp
+ */
 function bp_activity_action_delete_activity() {
 	global $bp;
 
@@ -289,26 +305,36 @@
 	if ( empty( $bp->action_variables[0] ) || !is_numeric( $bp->action_variables[0] ) )
 		return false;
 
-	/* Check the nonce */
+	// Check the nonce
 	check_admin_referer( 'bp_activity_delete_link' );
 
 	$activity_id = $bp->action_variables[0];
 	$activity = new BP_Activity_Activity( $activity_id );
 
-	/* Check access */
+	// Check access
 	if ( !is_super_admin() && $activity->user_id != $bp->loggedin_user->id )
 		return false;
-
+	
 	/* Call the action before the delete so plugins can still fetch information about it */
 	do_action( 'bp_activity_action_delete_activity', $activity_id, $activity->user_id );
 
-	/* Now delete the activity item */
+	// Always redirect somewhere
+	$bp_redirect_to = $bp->root_domain;
+
+	// Check for the redirect query arg, otherwise let WP handle things
+	if ( isset( $_GET['bp_redirect_to'] ) ) {
+		$bp_redirect_to = $_GET['bp_redirect_to'];
+	} else {
+		$bp_redirect_to = wp_get_referer();
+	}
+
+	// Now delete the activity item
 	if ( bp_activity_delete( array( 'id' => $activity_id, 'user_id' => $activity->user_id ) ) )
 		bp_core_add_message( __( 'Activity deleted', 'buddypress' ) );
 	else
 		bp_core_add_message( __( 'There was an error when deleting that activity', 'buddypress' ), 'error' );
 
-	bp_core_redirect( wp_get_referer() );
+	bp_core_redirect( $bp_redirect_to );
 }
 add_action( 'wp', 'bp_activity_action_delete_activity', 3 );
 
Index: bp-themes/bp-default/_inc/ajax.php
===================================================================
--- bp-themes/bp-default/_inc/ajax.php	(revision 3608)
+++ bp-themes/bp-default/_inc/ajax.php	(working copy)
@@ -221,7 +221,20 @@
 }
 add_action( 'wp_ajax_new_activity_comment', 'bp_dtheme_new_activity_comment' );
 
-/* AJAX delete an activity */
+/**
+ * bp_dtheme_delete_activity()
+ *
+ * Delete specific activity item via AJAX.
+ *
+ * @since 1.2
+ *
+ * @uses do_action() Calls 'bp_activity_action_delete_activity' hook to allow action
+ * 	to be taken before the activity is deleted.	
+ * @uses bp_activity_delete()
+ *
+ * @global object $bp BuddyPress global settings
+ * @return bool False on failure. True if activity deleted.
+ */
 function bp_dtheme_delete_activity() {
 	global $bp;
 
Index: bp-activity/bp-activity-templatetags.php
===================================================================
--- bp-activity/bp-activity-templatetags.php	(revision 3608)
+++ bp-activity/bp-activity-templatetags.php	(working copy)
@@ -841,13 +841,45 @@
 		return apply_filters( 'bp_get_activity_css_class', $activities_template->activity->component . ' ' . $activities_template->activity->type . $class );
 	}
 
+/**
+ * bp_activity_delete_link()
+ *
+ * Display the activity delete link.
+ *
+ * @package BuddyPress Activity
+ * @since 1.1
+ *
+ * @uses bp_get_activity_delete_link()
+ */
 function bp_activity_delete_link() {
 	echo bp_get_activity_delete_link();
 }
+	/**
+	 * bp_get_activity_delete_link()
+	 *
+	 * Return the activity delete link.
+	 *
+	 * @package BuddyPress Activity
+	 * @since 1.1
+	 *
+	 * @uses apply_filters() Calls 'bp_get_activity_delete_link' hook to allow altering
+	 * 	of the activity delete link.	
+	 * @uses wp_nonce_url()
+	 * @uses add_query_arg()
+	 * @uses wp_get_referer()
+	 *
+	 * @global object $bp BuddyPress global settings
+	 * @global object $activities_template BuddyPress Activities Template
+	 * @return string Activity delete link. Contains $bp_redirect_to arg if on single activity page.
+	 */
 	function bp_get_activity_delete_link() {
 		global $activities_template, $bp;
 
-		return apply_filters( 'bp_get_activity_delete_link', '<a href="' . wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug . '/delete/' . $activities_template->activity->id, 'bp_activity_delete_link' ) . '" class="item-button delete-activity confirm" rel="nofollow">' . __( 'Delete', 'buddypress' ) . '</a>' );
+		// Determine if we're on a single activity page, and customize accordingly
+		if ( !empty( $bp->current_component ) && $bp->current_component == BP_ACTIVITY_SLUG && !empty( $bp->current_action ) && is_numeric( $bp->current_action ) )
+			return apply_filters( 'bp_get_activity_delete_link', '<a href="' . wp_nonce_url( add_query_arg( array( 'bp_redirect_to' => wp_get_referer() ), $bp->root_domain . '/' . $bp->activity->slug . '/delete/' . $activities_template->activity->id ), 'bp_activity_delete_link' ) . '" class="item-button delete-single-activity confirm" rel="nofollow">' . __( 'Delete', 'buddypress' ) . '</a>' );
+		else
+			return apply_filters( 'bp_get_activity_delete_link', '<a href="' . wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug . '/delete/' . $activities_template->activity->id, 'bp_activity_delete_link' ) . '" class="item-button delete-activity confirm" rel="nofollow">' . __( 'Delete', 'buddypress' ) . '</a>' );
 	}
 
 function bp_activity_latest_update( $user_id = false ) {
