diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index a3b90e09d8..d04be17a42 100644
--- a/wp-admin/includes/template.php
+++ b/wp-admin/includes/template.php
@@ -1279,30 +1279,40 @@ 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'] = " | ";
- $actions['unapprove'] = " | ";
- $actions['edit'] = "". __('Edit') . ' | ';
- if ( 'spam' != $the_comment_status )
- $actions['spam'] = " | ';
- $actions['delete'] = "';
-
+ $actions['approve'] = "';
+ $actions['unapprove'] = "';
if ( $comment_status ) { // not looking at all comments
if ( 'approved' == $the_comment_status ) {
- $actions['unapprove'] = " | ';
+ $actions['unapprove'] = "';
unset($actions['approve']);
} else {
- $actions['approve'] = " | ';
+ $actions['approve'] = "';
unset($actions['unapprove']);
}
}
-
if ( 'spam' != $the_comment_status )
- $actions['reply'] = ' | ' . __('Reply') . '';
+ $actions['spam'] = "';
+ $actions['delete'] = "';
+ $actions['edit'] = "". __('Edit') . '';
+ if ( 'spam' != $the_comment_status )
+ $actions['reply'] = '' . __('Reply') . '';
$actions = apply_filters( 'comment_row_actions', $actions, $comment );
- foreach ( $actions as $action => $link )
- echo "$link\n";
+ $action_count = count($actions);
+ $i = 0;
+ foreach ( $actions as $action => $link ) {
+ ++$i;
+ ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
+ // The action before reply shouldn't output a sep
+ if ( 'edit' == $action )
+ $sep = '';
+ // Reply needs a hide-if-no-js span
+ if ( 'reply' == $action )
+ echo " | $link$sep";
+ else
+ echo "$link$sep";
+ }
}
?>