bp_core_screen_activation()
Handle the loading of the Activate screen.
Description
Source
File: bp-members/screens/activate.php
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | function bp_core_screen_activation() { // Bail if not viewing the activation page. if ( ! bp_is_current_component( 'activate' ) ) { return false; } // If the user is already logged in, redirect away from here. if ( is_user_logged_in() ) { // If activation page is also front page, set to members directory to // avoid an infinite loop. Otherwise, set to root domain. $redirect_to = bp_is_component_front_page( 'activate' ) ? bp_get_members_directory_permalink() : bp_get_root_domain(); // Trailing slash it, as we expect these URL's to be. $redirect_to = trailingslashit( $redirect_to ); /** * Filters the URL to redirect logged in users to when visiting activation page. * * @since BuddyPress 1.9.0 * * @param string $redirect_to URL to redirect user to. */ $redirect_to = apply_filters( 'bp_loggedin_activate_page_redirect_to' , $redirect_to ); // Redirect away from the activation page. bp_core_redirect( $redirect_to ); } // Get BuddyPress. $bp = buddypress(); /** * Filters the template to load for the Member activation page screen. * * @since BuddyPress 1.1.1 * * @param string $value Path to the Member activation template to load. */ bp_core_load_template( apply_filters( 'bp_core_template_activate' , array ( 'activate' , 'registration/activate' ) ) ); } |
Changelog
Version | Description |
---|---|
BuddyPress 1.1.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.