Created
December 12, 2018 22:41
-
-
Save KaineLabs/9f5e22de20093aada64e1676b336249a to your computer and use it in GitHub Desktop.
Buddypress Disable Registration
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 | |
/** | |
* 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