Created
December 16, 2016 13:26
-
-
Save SirDarcanos/4ae2d0a09d655d2f99e51cd5d3e86cd2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Print a View Comment link in the comments list in the admin. | |
* | |
* @param array $actions | |
* @return array | |
*/ | |
function custom_view_comment_action( $actions ) { | |
global $comment; | |
if ( $comment->comment_type !== '' ) { | |
return $actions; | |
} | |
$actions['view_comment'] = '<a href="' . get_comment_link( $comment ) . '" title="View Comment" target="_blank">View Comment</a>'; | |
return $actions; | |
} | |
add_filter( 'comment_row_actions', 'custom_view_comment_action' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment