Make WordPress Core

Ticket #18885: 18885.patch

File 18885.patch, 2.7 KB (added by rachelbaker, 10 years ago)
  • src/wp-admin/includes/dashboard.php

     
    565565                $comment_post_link = $comment_post_title;
    566566        }
    567567
    568         $comment_link = '<a class="comment-link" href="' . esc_url(get_comment_link()) . '">#</a>';
    569 
    570568        $actions_string = '';
    571569        if ( current_user_can( 'edit_comment', $comment->comment_ID ) ) {
    572570                // Pre-order it: Approve | Reply | Edit | Spam | Trash.
     
    575573                        'reply' => '',
    576574                        'edit' => '',
    577575                        'spam' => '',
    578                         'trash' => '', 'delete' => ''
     576                        'trash' => '', 'delete' => '',
     577                        'view' => '',
    579578                );
    580579
    581580                $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) );
     
    596595                        $actions['delete'] = "<a href='$delete_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>';
    597596                else
    598597                        $actions['trash'] = "<a href='$trash_url' data-wp-lists='delete:the-comment-list:comment-$comment->comment_ID::trash=1' class='delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>';
     598                if ( '1' === $comment->comment_approved ) {
     599                        $actions['view'] = '<a class="comment-link" href="' . esc_url( get_comment_link() ) . '">' . _x( 'View', 'verb' ) . '</a>';
     600                }
    599601
    600602                /**
    601603                 * Filter the action links displayed for each comment in the 'Recent Comments'
     
    634636                        <div class="dashboard-comment-wrap has-row-actions">
    635637                        <h4 class="comment-meta">
    636638                                <?php printf( /* translators: 1: comment author, 2: post link, 3: notification if the comment is pending */__( 'From %1$s on %2$s%3$s' ),
    637                                         '<cite class="comment-author">' . get_comment_author_link() . '</cite>', $comment_post_link.' '.$comment_link, ' <span class="approve">' . __( '[Pending]' ) . '</span>' ); ?>
     639                                        '<cite class="comment-author">' . get_comment_author_link() . '</cite>', $comment_post_link, ' <span class="approve">' . __( '[Pending]' ) . '</span>' ); ?>
    638640                        </h4>
    639641
    640642                        <?php
     
    653655                        ?>
    654656                        <div class="dashboard-comment-wrap has-row-actions">
    655657                        <?php /* translators: %1$s is type of comment, %2$s is link to the post */ ?>
    656                         <h4 class="comment-meta"><?php printf( _x( '%1$s on %2$s', 'dashboard' ), "<strong>$type</strong>", $comment_post_link." ".$comment_link ); ?></h4>
     658                        <h4 class="comment-meta"><?php printf( _x( '%1$s on %2$s', 'dashboard' ), "<strong>$type</strong>", $comment_post_link ); ?></h4>
    657659                        <p class="comment-author"><?php comment_author_link(); ?></p>
    658660
    659661                        <?php endif; // comment_type ?>