mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-09 03:30:06 +00:00
Dashboard: toggle the "View" link for comments when Approving / Unapproving from the Dashboard widget.
Fixes #35518. git-svn-id: https://develop.svn.wordpress.org/trunk@37302 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -630,9 +630,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
||||
$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' aria-label='" . esc_attr__( 'Move this comment to the Trash' ) . "'>" . _x( 'Trash', 'verb' ) . '</a>';
|
||||
}
|
||||
|
||||
if ( '1' === $comment->comment_approved ) {
|
||||
$actions['view'] = '<a class="comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '" aria-label="' . esc_attr__( 'View this comment' ) . '">' . __( 'View' ) . '</a>';
|
||||
}
|
||||
$actions['view'] = '<a class="comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '" aria-label="' . esc_attr__( 'View this comment' ) . '">' . __( 'View' ) . '</a>';
|
||||
|
||||
/**
|
||||
* Filter the action links displayed for each comment in the 'Recent Comments'
|
||||
@@ -653,9 +651,13 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
|
||||
( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';
|
||||
|
||||
// Reply and quickedit need a hide-if-no-js span
|
||||
if ( 'reply' == $action || 'quickedit' == $action )
|
||||
if ( 'reply' == $action || 'quickedit' == $action ) {
|
||||
$action .= ' hide-if-no-js';
|
||||
}
|
||||
|
||||
if ( 'view' === $action && '1' !== $comment->comment_approved ) {
|
||||
$action .= ' hidden';
|
||||
}
|
||||
$actions_string .= "<span class='$action'>$sep$link</span>";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user