How can I filter the comment action links so that I can display the actions links based on user capabilities?

Yes, there is a hook you can use to filter the action links: comment_row_actions. E.g. add_filter( ‘comment_row_actions’, ‘my_comment_row_actions’, 10, 2 ); function my_comment_row_actions( $actions, $comment ) { // Filter the actions by user role. $roles = (array) wp_get_current_user()->roles; if ( in_array( ‘administrator’, $roles ) ) { $actions[‘foo’] = ‘<a href=”#”>Foo action</a>’; } // Filter the … Read more

How to remove a span class?

You shouldn’t be stripping this via the functions.php file but rather edit the comments.php to remove the span directly. If this is a commercial theme that receives updates then you should do it by creating a child theme and customizing your functions.php & comments.php in that child theme. This is a great tutorial on how … Read more