Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Created June 14, 2019 00:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/72816f2f0ec3e6b9662779c860d34820 to your computer and use it in GitHub Desktop.
Save KaineLabs/72816f2f0ec3e6b9662779c860d34820 to your computer and use it in GitHub Desktop.
Disable Buddypress Registration
<?php
/**
* Disable Buddypress Registration
*/
function yzc_disable_bp_registration() {
remove_action( 'bp_init', 'bp_core_wpsignup_redirect' );
remove_action( 'bp_screens', 'bp_core_screen_signup' );
}
add_action( 'bp_loaded', 'yzc_disable_bp_registration' );
function yzc_redirect_bp_signup_page( $page ){
return bp_get_root_domain() . '/wp-login.php?action=register';
}
add_filter( 'bp_get_signup_page', 'yzc_redirect_bp_signup_page' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment