Last active
February 23, 2016 03:56
-
-
Save QROkes/30ca3b2b2404290a3893 to your computer and use it in GitHub Desktop.
Modify entry comments in WordPress according to the e-mail address.
This file contains 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
// Modify entry comments | |
function qr_admin_author($comment_data){ | |
if ($comment_data['comment_author_email'] == '[email protected]') { | |
$comment_data['user_ID'] = 1; | |
$comment_data['comment_author'] = 'Author Name'; | |
$comment_data['comment_author_url'] = 'Author URL'; | |
} | |
return $comment_data; | |
} | |
add_filter('preprocess_comment','qr_admin_author'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment