From 0a060e1c8ab2f957ad655f83b06335aef768b48e Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Mon, 21 Aug 2023 10:51:40 +0200 Subject: [PATCH] functions.php: add hook to prevent multisite signup --- functions.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functions.php b/functions.php index d162d1f..657127a 100644 --- a/functions.php +++ b/functions.php @@ -448,3 +448,11 @@ function user_registration_filter($user_id, $email) { return $user_id; } add_filter('email_exists', 'user_registration_filter', 10, 2); + +/* Security: prevent multisite signup */ +function prevent_multisite_signup() +{ + wp_redirect( site_url() ); + die(); +} +add_action( 'signup_header', 'prevent_multisite_signup' );