From 3c6e74c8c1005de22c0f368a0d6508e29abc3b2b Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 30 Jun 2008 20:46:39 +0000 Subject: [PATCH] comment_rows_actions filter from andy. fixes #7212 git-svn-id: http://svn.automattic.com/wordpress/trunk@8217 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/template.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 346fe7eb80..bde13d03f4 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -767,6 +767,7 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true $actions = array(); + if ( current_user_can('edit_post', $comment->comment_post_ID) ) { $actions['approve'] = "" . __( 'Approve' ) . ' | '; $actions['unapprove'] = "" . __( 'Unapprove' ) . ' | '; @@ -779,9 +780,9 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true unset($actions['approve']); } - if ( current_user_can('edit_post', $comment->comment_post_ID) ) { $actions['spam'] = "" . __( 'Spam' ) . ' | '; $actions['delete'] = "" . __('Delete') . ''; + $actions = apply_filters( 'comment_row_actions', $actions, $comment ); foreach ( $actions as $action => $link ) echo "$link"; }