Index: /trunk/includes/replies/template-tags.php
===================================================================
--- /trunk/includes/replies/template-tags.php	(revision 4984)
+++ /trunk/includes/replies/template-tags.php	(revision 4985)
@@ -1685,8 +1685,8 @@
  * @since bbPress (r2667)
  *
- * @param mixed $args See {@link bbp_get_reply_admin_links()}
+ * @param array $args See {@link bbp_get_reply_admin_links()}
  * @uses bbp_get_reply_admin_links() To get the reply admin links
  */
-function bbp_reply_admin_links( $args = '' ) {
+function bbp_reply_admin_links( $args = array() ) {
 	echo bbp_get_reply_admin_links( $args );
 }
@@ -1696,5 +1696,5 @@
 	 * @since bbPress (r2667)
 	 *
-	 * @param mixed $args This function supports these arguments:
+	 * @param array $args This function supports these arguments:
 	 *  - id: Optional. Reply id
 	 *  - before: HTML before the links. Defaults to
@@ -1718,5 +1718,5 @@
 	 * @return string Reply admin links
 	 */
-	function bbp_get_reply_admin_links( $args = '' ) {
+	function bbp_get_reply_admin_links( $args = array() ) {
 
 		// Parse arguments against default values
@@ -1732,18 +1732,17 @@
 
 		// If post is a topic, return the topic admin links instead
-		if ( bbp_is_topic( $r['id'] ) )
+		if ( bbp_is_topic( $r['id'] ) ) {
 			return bbp_get_topic_admin_links( $args );
+		}
 
 		// If post is not a reply, return
-		if ( !bbp_is_reply( $r['id'] ) )
+		if ( !bbp_is_reply( $r['id'] ) ) {
 			return;
-
-		// Make sure user can edit this reply
-		if ( !current_user_can( 'edit_reply', $r['id'] ) )
+		}
+
+		// If topic is trashed, do not show admin links
+		if ( bbp_is_topic_trash( bbp_get_reply_topic_id( $r['id'] ) ) ) {
 			return;
-
-		// If topic is trashed, do not show admin links
-		if ( bbp_is_topic_trash( bbp_get_reply_topic_id( $r['id'] ) ) )
-			return;
+		}
 
 		// If no links were passed, default to the standard
@@ -1759,8 +1758,4 @@
 		}
 
-		// Check caps for trashing the topic
-		if ( !current_user_can( 'delete_reply', $r['id'] ) && !empty( $r['links']['trash'] ) )
-			unset( $r['links']['trash'] );
-
 		// See if links need to be unset
 		$reply_status = bbp_get_reply_status( $r['id'] );
@@ -1768,9 +1763,9 @@
 
 			// Spam link shouldn't be visible on trashed topics
-			if ( bbp_get_trash_status_id() == $reply_status ) {
+			if ( bbp_get_trash_status_id() === $reply_status ) {
 				unset( $r['links']['spam'] );
 
 			// Trash link shouldn't be visible on spam topics
-			} elseif ( isset( $r['links']['trash'] ) && ( bbp_get_spam_status_id() == $reply_status ) ) {
+			} elseif ( bbp_get_spam_status_id() === $reply_status ) {
 				unset( $r['links']['trash'] );
 			}
@@ -1781,5 +1776,5 @@
 		$retval = $r['before'] . $links . $r['after'];
 
-		return apply_filters( 'bbp_get_reply_admin_links', $retval, $r );
+		return apply_filters( 'bbp_get_reply_admin_links', $retval, $r, $args );
 	}
 
Index: /trunk/includes/topics/template-tags.php
===================================================================
--- /trunk/includes/topics/template-tags.php	(revision 4984)
+++ /trunk/includes/topics/template-tags.php	(revision 4985)
@@ -2217,8 +2217,8 @@
  * Output admin links for topic
  *
- * @param mixed $args See {@link bbp_get_topic_admin_links()}
+ * @param array $args See {@link bbp_get_topic_admin_links()}
  * @uses bbp_get_topic_admin_links() To get the topic admin links
  */
-function bbp_topic_admin_links( $args = '' ) {
+function bbp_topic_admin_links( $args = array() ) {
 	echo bbp_get_topic_admin_links( $args );
 }
@@ -2228,5 +2228,5 @@
 	 * Move topic functionality is handled by the edit topic page.
 	 *
-	 * @param mixed $args This function supports these arguments:
+	 * @param array $args This function supports these arguments:
 	 *  - id: Optional. Topic id
 	 *  - before: Before the links
@@ -2247,5 +2247,5 @@
 	 * @return string Topic admin links
 	 */
-	function bbp_get_topic_admin_links( $args = '' ) {
+	function bbp_get_topic_admin_links( $args = array() ) {
 
 		// Parse arguments against default values
@@ -2257,7 +2257,4 @@
 			'links'  => array()
 		), 'get_topic_admin_links' );
-
-		if ( !current_user_can( 'edit_topic', $r['id'] ) )
-			return;
 
 		if ( empty( $r['links'] ) ) {
@@ -2273,8 +2270,4 @@
 		}
 
-		// Check caps for trashing the topic
-		if ( !current_user_can( 'delete_topic', $r['id'] ) && !empty( $r['links']['trash'] ) )
-			unset( $r['links']['trash'] );
-
 		// See if links need to be unset
 		$topic_status = bbp_get_topic_status( $r['id'] );
@@ -2285,16 +2278,18 @@
 
 			// Spam link shouldn't be visible on trashed topics
-			if ( $topic_status == bbp_get_trash_status_id() )
+			if ( bbp_get_trash_status_id() === $topic_status ) {
 				unset( $r['links']['spam'] );
 
 			// Trash link shouldn't be visible on spam topics
-			elseif ( $topic_status == bbp_get_spam_status_id() )
+			} elseif ( bbp_get_spam_status_id() === $topic_status ) {
 				unset( $r['links']['trash'] );
+			}
 		}
 
 		// Process the admin links
-		$links = implode( $r['sep'], array_filter( $r['links'] ) );
-
-		return apply_filters( 'bbp_get_topic_admin_links', $r['before'] . $links . $r['after'], $r );
+		$links  = implode( $r['sep'], array_filter( $r['links'] ) );
+		$retval = $r['before'] . $links . $r['after'];
+
+		return apply_filters( 'bbp_get_topic_admin_links', $retval, $r, $args );
 	}
 
