Make WordPress Core


Ignore:
Timestamp:
04/22/2016 09:29:19 PM (11 years ago)
Author:
wonderboymusic
Message:

Dashboard: toggle the "View" link for comments when Approving / Unapproving from the Dashboard widget.

Fixes #35518.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r36964 r37302  
    631631                }
    632632
    633                 if ( '1' === $comment->comment_approved ) {
    634                         $actions['view'] = '<a class="comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '" aria-label="' . esc_attr__( 'View this comment' ) . '">' . __( 'View' ) . '</a>';
    635                 }
     633                $actions['view'] = '<a class="comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '" aria-label="' . esc_attr__( 'View this comment' ) . '">' . __( 'View' ) . '</a>';
    636634
    637635                /**
    … …  
    654652
    655653                        // Reply and quickedit need a hide-if-no-js span
    656                         if ( 'reply' == $action || 'quickedit' == $action )
     654                        if ( 'reply' == $action || 'quickedit' == $action ) {
    657655                                $action .= ' hide-if-no-js';
    658 
     656                        }
     657
     658                        if ( 'view' === $action && '1' !== $comment->comment_approved ) {
     659                                $action .= ' hidden';
     660                        }
    659661                        $actions_string .= "<span class='$action'>$sep$link</span>";
    660662                }
Note: See TracChangeset for help on using the changeset viewer.