From 19bcccb82855d4830443e652c32743640d722b3d Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 30 Jun 2008 20:46:39 +0000 Subject: [PATCH] comment_rows_actions filter from andy. fixes #7212 git-svn-id: https://develop.svn.wordpress.org/trunk@8217 602fd350-edb4-49c9-b593-d223f7449a82 --- 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"; }