SHARE
TWEET

Untitled

a guest Jun 25th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * Disable Buddypress Registration
  4.  */
  5. function yzc_disable_bp_registration() {
  6.   remove_action( 'bp_init',    'bp_core_wpsignup_redirect' );
  7.   remove_action( 'bp_screens', 'bp_core_screen_signup' );
  8. }
  9.  
  10. add_action( 'bp_loaded', 'yzc_disable_bp_registration' );
  11.  
  12. function yzc_redirect_bp_signup_page( $page ){
  13.     return bp_get_root_domain() . '/wp-login.php?action=register';
  14. }
  15.  
  16. add_filter( 'bp_get_signup_page', 'yzc_redirect_bp_signup_page' );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top