Skip to:
Content

BuddyPress.org

Changeset 2300


Ignore:
Timestamp:
01/15/2010 11:06:11 AM (15 years ago)
Author:
apeatling
Message:

Fixes #1587

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-signup.php

    r2274 r2300  
    245245/* Kill the wp-signup.php if custom registration signup templates are present */
    246246function bp_core_wpsignup_redirect() {
    247     if ( false === strpos( $_SERVER['SCRIPT_NAME'], 'wp-signup.php') )
     247    if ( false === strpos( $_SERVER['SCRIPT_NAME'], 'wp-signup.php') && $_GET['action'] != 'register' )
    248248        return false;
    249249
    250250    if ( locate_template( array( 'registration/register.php' ), false ) || locate_template( array( 'register.php' ), false ) )
    251         wp_redirect( bp_root_domain() . BP_REGISTER_SLUG );
    252 }
    253 add_action( 'signup_header', 'bp_core_wpsignup_redirect' );
     251        wp_redirect( bp_get_root_domain() . '/' . BP_REGISTER_SLUG );
     252}
     253if ( bp_core_is_multisite() )
     254    add_action( 'wp', 'bp_core_wpsignup_redirect' );
     255else
     256    add_action( 'init', 'bp_core_wpsignup_redirect' );
     257
    254258?>
Note: See TracChangeset for help on using the changeset viewer.