I'm trying to configure the comments screen in the backend to fit my project. I've already been able to take a first step by resolving this question:

Comments screen in backend, how to disable Quick Edit | Edit | History | Spam | for non admins

Now I'd like the post author viewing all the comments received to be unable to see the email account of the commenter. I'm a bit afraid that some of the authors could create some posts just to receive tons of comments and be able to see all the email accounts in his backend to use them for spamming purposes.

Is it possible to keep the email account of the commenter only to be viewable by the admin? Thanks!

I've been looking for hours online but the only kind of plugin I found is 6 years old and is not working

 Plugin Name: Erase Commenter Details
 Plugin URI: http://wordpress.org/support/topic/143772
 Description: Removes IP, e-mail and URL of comment authors from Comments admin when viewed by 'contributors.'
 Version: R1
 Author: Kaf Oseo
 Author URI: http://szub.net

Copyright (c) 2007 Kaf Oseo (http://szub.net)
Erase Commenter Details is released under the GNU General Public License

This is a WordPress plugin (http://wordpress.org).


function szub_erase_commenter_details($text) {
if( !current_user_can('publish_posts') ) {
    $patterns = array('/ \| <a href=\'.*\' rel=\'external\'>.*<\/a>/', '/ \| ' . __('IP') . ': <a href=.*<\/a>/', '/ \| <a href=\'mailto:.*<\/a>/', '/<th scope="col">(' . __('E-mail') . '|' . __('IP') . ')<\/th>/', '/<td>(<a href=(\'mailto|"edit-comments\.php).*<\/a>)?<\/td>/');
    $text = preg_replace($patterns, '', $text);
return $text;

if( strpos($_SERVER['REQUEST_URI'], 'wp-admin/edit-comments.php') ) {

1 Answer 1


There is a filter 'comment_email'. Hook into that filter after the action 'load-edit-comments.php' and hide the email:

add_action( 'load-edit-comments.php', 't5_hide_commenter_email' );

function t5_hide_commenter_email()
    if ( ! current_user_can( 'manage_options' ) )
        add_filter( 'comment_email', '__return_false' );
  • @user27309 See my update, I made it even simpler. :)
    – fuxia
    Mar 26, 2013 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.