Skip to content

Instantly share code, notes, and snippets.

@imath
Created December 23, 2023 14:24
Show Gist options
  • Save imath/c5c34feb5d3c9b3070f7a11bc339f103 to your computer and use it in GitHub Desktop.
Save imath/c5c34feb5d3c9b3070f7a11bc339f103 to your computer and use it in GitHub Desktop.
Disable BuddyPress Signups feature.
<?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