Created
December 23, 2023 14:24
-
-
Save imath/c5c34feb5d3c9b3070f7a11bc339f103 to your computer and use it in GitHub Desktop.
Disable BuddyPress Signups feature.
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
<?php | |
function disable_bp_signups() { | |
add_filter( 'bp_get_signup_allowed', '__return_false' ); | |
remove_filter( 'register_url', 'bp_get_signup_page' ); | |
remove_action( 'bp_init', 'bp_core_wpsignup_redirect' ); | |
remove_filter( 'wp_signup_location', 'bp_blogs_creation_location' ); | |
remove_filter( 'wpmu_signup_user_notification', 'bp_core_activation_signup_user_notification', 1 ); | |
} | |
add_action( 'bp_include', 'disable_bp_signups' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment