Prevent User Enumeration
if (!is_admin()) {
// block WP enum scans
if (preg_match('/(wp-comments-post)/', $_SERVER['REQUEST_URI']) === 0 && !empty($_REQUEST['author'])) {
wp_redirect(home_url());
exit;
}
}
if (!is_admin()) {
// block WP enum scans
if (preg_match('/(wp-comments-post)/', $_SERVER['REQUEST_URI']) === 0 && !empty($_REQUEST['author'])) {
wp_redirect(home_url());
exit;
}
}