bp_core_wpsignup_redirect

Redirect away from wp-signup.php if BP registration templates are present.

Description

bp_core_wpsignup_redirect(); 

Usage

  1. if ( !function_exists( 'bp_core_wpsignup_redirect' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-members/bp-members-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_core_wpsignup_redirect(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-members/bp-members-functions.php  
  1. function bp_core_wpsignup_redirect() { 
  2.  
  3. // Bail in admin or if custom signup page is broken. 
  4. if ( is_admin() || ! bp_has_custom_signup_page() ) { 
  5. return; 
  6.  
  7. $action = !empty( $_GET['action'] ) ? $_GET['action'] : ''; 
  8.  
  9. // Not at the WP core signup page and action is not register. 
  10. if ( ! empty( $_SERVER['SCRIPT_NAME'] ) && false === strpos( 'wp-signup.php', $_SERVER['SCRIPT_NAME'] ) && ( 'register' != $action ) ) { 
  11. return; 
  12.