bp_template_redirect()
Fire the ‘bp_template_redirect’ action.
Description
Run at ‘template_redirect’, just before WordPress selects and loads a theme template. The main purpose of this hook in BuddyPress is to redirect users who do not have the proper permission to access certain content.
Source
File: bp-core/bp-core-dependency.php
function bp_template_redirect() { /** * Fires inside the 'bp_template_redirect' function. * * @since BuddyPress 1.6.0 */ do_action( 'bp_template_redirect' ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.6.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.