• wakeup

    (@wakeup)


    Is there any way to unable to the anonym commenters to use “admin” nickname?

    I need to allow anonym comments…

    Thanks in advance

Viewing 1 replies (of 1 total)
  • tosak

    (@tosak)

    You could add a filter..

    Add this to your theme’s functions.php

    function checkCommenterName($data)
    {
    	$name = trim(strtolower($data['comment_author']));
    	if($name == 'admin')
    	{
    		$data['comment_author'] = 'Not admin';
    	}
    	return $data;
    }
    
    add_filter('preprocess_comment', 'checkCommenterName');

Viewing 1 replies (of 1 total)
  • The topic ‘Avoid “admin” as nick in anonym comments’ is closed to new replies.