Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Buddypress Disable Registration
<?php
/**
* Disable Registration Buddypress
*/
add_action( 'bp_loaded', 'yzc_disable_bp_registration' );
function yzc_disable_bp_registration() {
remove_action( 'bp_init', 'bp_core_wpsignup_redirect' );
remove_action( 'bp_screens', 'bp_core_screen_signup' );
}
/**
* Disable Registeration Page Redirect.
*/
add_filter( 'bp_get_signup_page', 'yzc_redirect_bp_signup_page' );
function yzc_redirect_bp_signup_page($page ){
return bp_get_root_domain() . '/wp-login.php?action=register';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment